Test cases and fixes for GraphicsPath.jvm.cs
authorBoris Kirzner <borisk@mono-cvs.ximian.com>
Wed, 10 Aug 2005 16:15:49 +0000 (16:15 -0000)
committerBoris Kirzner <borisk@mono-cvs.ximian.com>
Wed, 10 Aug 2005 16:15:49 +0000 (16:15 -0000)
svn path=/trunk/mcs/; revision=48235

mcs/class/System.Drawing/ChangeLog
mcs/class/System.Drawing/System.Drawing.Drawing2D/ChangeLog
mcs/class/System.Drawing/System.Drawing.Drawing2D/ExtendedGeneralPath.jvm.cs [new file with mode: 0644]
mcs/class/System.Drawing/System.Drawing.Drawing2D/GeneralPathIterator.jvm.cs [new file with mode: 0644]
mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.jvm.cs
mcs/class/System.Drawing/System.Drawing.vmwcsproj
mcs/class/System.Drawing/Test/ChangeLog
mcs/class/System.Drawing/Test/DrawingTest/Test/ChangeLog
mcs/class/System.Drawing/Test/DrawingTest/Test/GraphicsPath.cs [new file with mode: 0644]
mcs/class/System.Drawing/Test/Test.dotnet.csproj
mcs/class/System.Drawing/Test/Test.vmwcsproj

index f638a7d1243725c749a0713d971dd5d7c8168b5f..7929744af4f95f81629299f9da44b815aaca6c8a 100644 (file)
@@ -1,3 +1,6 @@
+2005-08-10 Boris Kirzner <borisk@mainsoft.com>
+       * System.Drawing.vmwcsproj: Added ExtendedGeneralPath.jvm.cs and GeneralPathIterator.jvm.cs.
+
 2005-08-09 Konstantin Triger <kostat@mainsoft.com>
 
        * System.Drawing.vmwcsproj: Added AdvancedStoke.jvm.cs and StrokeFactory.jvm.cs
index 6a939d6eea573cef749e10c7bf9a10c13ccd05bd..a090ac8c2c56839c0fdcc6ebc5a33aa4319a7e0b 100644 (file)
@@ -1,3 +1,19 @@
+2005-08-10 Boris Kirzner <borisk@mainsoft.com>
+       * ExtendedGeneralPath.jvm.cs: Added new class. Extends java GeneralPath
+       functionality.
+       * GeneralPathIterator.jvm.cs: Added new class. Implements java PathIterator.
+       * GraphicsPath.jvm.cs:
+               - Redefined JPI enums so their values are defined in the single place.
+               - NativeObject is now of type ExtendedGeneralPath.
+               - Implemented missing constructors.
+               - Implemented PathData and PointCount.
+               - Decision about connecting to previous figure is now handled in 
+               ExtendedGeneralPath.
+               - Reimplemented AddRectangle to obtain right number of points.
+               - Reimplemented GetLastPoint using ExtendedGeneralPath.
+               - CloseAllFigures must close path at the end.
+               - Fixed StartFigure.            
+
 2005-08-10 Konstantin Triger <kostat@mainsoft.com>
 
        * GraphicsPath.jvm.cs: implemented GraphicsPath.Widen
diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/ExtendedGeneralPath.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/ExtendedGeneralPath.jvm.cs
new file mode 100644 (file)
index 0000000..2827b98
--- /dev/null
@@ -0,0 +1,402 @@
+using System;\r
+\r
+using java.awt;\r
+using java.awt.geom;\r
+using java.lang;\r
+\r
+namespace System.Drawing.Drawing2D\r
+{\r
+       internal class ExtendedGeneralPath : Shape, ICloneable\r
+       {\r
+               #region Fields\r
+\r
+               public const int WIND_EVEN_ODD = 0; //PathIterator__Finals.WIND_EVEN_ODD;\r
+               public const int WIND_NON_ZERO = 1; //PathIterator__Finals.WIND_NON_ZERO;\r
+               \r
+               public const sbyte SEG_MOVETO  = 0; //(byte) PathIterator__Finals.SEG_MOVETO;\r
+               public const sbyte SEG_LINETO  = 1; //(byte) PathIterator__Finals.SEG_LINETO;\r
+               public const sbyte SEG_QUADTO  = 2; //(byte) PathIterator__Finals.SEG_QUADTO;\r
+               public const sbyte SEG_CUBICTO = 3; //(byte) PathIterator__Finals.SEG_CUBICTO;\r
+               public const sbyte SEG_CLOSE   = 4; //(byte) PathIterator__Finals.SEG_CLOSE;\r
+               \r
+               public const sbyte SEG_START      = 16; // segment start\r
+\r
+               public const sbyte SEG_MASK       = SEG_MOVETO | SEG_LINETO | SEG_QUADTO | SEG_CUBICTO | SEG_CLOSE; // mask to eliminate SEG_CLOSE and SEG_MARKER\r
+\r
+               private const sbyte SEG_MARKER = 32; // path marker\r
+               private const sbyte SEG_UNMARK_MASK = 95; // path unmarker\r
+               \r
+\r
+               private sbyte [] _types;\r
+               private float [] _coords;\r
+               private int _typesCount;\r
+               private int _coordsCount;\r
+               private int _windingRule;\r
+\r
+               const int INIT_SIZE = 20;\r
+               const int EXPAND_MAX = 500;\r
+\r
+               #endregion // Fileds\r
+\r
+               #region Constructors\r
+\r
+           public ExtendedGeneralPath() : this (WIND_NON_ZERO, INIT_SIZE, INIT_SIZE)\r
+               {\r
+               }\r
+\r
+               public ExtendedGeneralPath(int rule) : this (rule, INIT_SIZE, INIT_SIZE)\r
+               {\r
+               }\r
+\r
+               public ExtendedGeneralPath(int rule, int initialCapacity) : this (rule, initialCapacity, initialCapacity)\r
+               {\r
+               }\r
+\r
+               public ExtendedGeneralPath(Shape s) : this(WIND_NON_ZERO, INIT_SIZE, INIT_SIZE)\r
+               {\r
+                       PathIterator pi = s.getPathIterator (null);\r
+                       setWindingRule (pi.getWindingRule ());\r
+                       append (pi, false);\r
+               }\r
+\r
+               private ExtendedGeneralPath(int rule, int initialTypes, int initialCoords) \r
+               {\r
+                       setWindingRule(rule);\r
+                       _types = new sbyte [initialTypes];\r
+                       _coords = new float [initialCoords * 2];\r
+               }\r
+\r
+               #endregion // Constructors\r
+\r
+               #region Properties\r
+\r
+               private GeneralPath GeneralPath\r
+               {\r
+                       get {\r
+                               PathIterator iter = getPathIterator (null);\r
+                               GeneralPath path = new GeneralPath ();\r
+                               path.append (iter, false);\r
+                               return path;\r
+                       }\r
+               }\r
+\r
+               public sbyte [] Types\r
+               {\r
+                       get { return _types; }\r
+               }\r
+\r
+               public float [] Coords\r
+               {\r
+                       get { return _coords; }\r
+               }\r
+\r
+               public int TypesCount\r
+               {\r
+                       get { return _typesCount; }\r
+               }\r
+\r
+               public int CoordsCount\r
+               {\r
+                       get { return _coordsCount; }\r
+               }\r
+\r
+               public bool LastFigureClosed\r
+               {\r
+                       get { \r
+                               return ((TypesCount == 0) || \r
+                                       ((Types [TypesCount - 1] & ExtendedGeneralPath.SEG_CLOSE) != 0) ||\r
+                                       ((Types [TypesCount - 1] & ExtendedGeneralPath.SEG_START) != 0));\r
+                       }\r
+               }\r
+\r
+\r
+\r
+               #endregion // Properties\r
+\r
+               #region Methods\r
+\r
+               public void append(Shape s)\r
+               {\r
+                       append (s, !LastFigureClosed);\r
+               }\r
+\r
+               #region GeneralPath\r
+\r
+               public void append(PathIterator pi, bool connect) \r
+               {\r
+                       float [] coords = new float [6];\r
+                       while (!pi.isDone ()) {\r
+                               switch (pi.currentSegment (coords)) {\r
+                                       case SEG_MOVETO:\r
+                                               if (!connect || _typesCount < 1 || _coordsCount < 2) {\r
+                                                       moveTo (coords [0], coords [1]);\r
+                                                       break;\r
+                                               }\r
+                                               if (_types [_typesCount - 1] != SEG_CLOSE &&\r
+                                                       _coords [_coordsCount - 2] == coords [0] &&\r
+                                                       _coords [_coordsCount - 1] == coords [1])\r
+                                                       break;  \r
+                                               goto case SEG_LINETO;\r
+                                       case SEG_LINETO:\r
+                                               lineTo (coords [0], coords [1]);\r
+                                               break;\r
+                                       case SEG_QUADTO:\r
+                                               quadTo (coords [0], coords [1], coords [2], coords [3]);\r
+                                               break;\r
+                                       case SEG_CUBICTO:\r
+                                               curveTo (coords [0], coords [1], coords [2], coords [3], coords [4], coords [5]);\r
+                                               break;\r
+                                       case SEG_CLOSE:\r
+                                               closePath ();\r
+                                       break;\r
+                               }\r
+                               pi.next ();\r
+                               connect = false;\r
+                       }\r
+               }\r
+\r
+               public void append(Shape s, bool connect) \r
+               {\r
+                       PathIterator pi = s.getPathIterator (null);\r
+                       append (pi,connect);\r
+               }\r
+\r
+               public object Clone() \r
+               {\r
+                       ExtendedGeneralPath copy = new ExtendedGeneralPath ();\r
+                       copy._types = (sbyte []) _types.Clone ();\r
+                       copy._coords = (float []) _coords.Clone ();\r
+                       return copy;\r
+               }\r
+\r
+               public void closePath() \r
+               {\r
+                       if (_typesCount == 0 || _types[_typesCount - 1] != SEG_CLOSE) {\r
+                               needRoom (1, 0, true);\r
+                               _types [_typesCount++] = SEG_CLOSE;\r
+                       }\r
+               }\r
+\r
+               public bool contains(double x, double y) \r
+               {                       \r
+                       return GeneralPath.contains (x, y);\r
+               }\r
+\r
+               public bool contains(double x, double y, double w, double h) \r
+               {\r
+                       return GeneralPath.contains (x, y, w, h);\r
+               }\r
+\r
+               public bool contains(Point2D p) \r
+               {\r
+                       return contains (p.getX (), p.getY ());\r
+               }\r
+\r
+               public bool contains(Rectangle2D r) \r
+               {\r
+                       return contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());\r
+               }\r
+\r
+               public Shape createTransformedShape(AffineTransform at) \r
+               {\r
+                       ExtendedGeneralPath gp = (ExtendedGeneralPath) Clone ();\r
+                       if (at != null) {\r
+                               gp.transform (at);\r
+                       }\r
+                       return gp;\r
+               }\r
+\r
+               public void curveTo(float x1, float y1, float x2, float y2, float x3, float y3) \r
+               {\r
+                       needRoom (1, 6, true);\r
+                       _types [_typesCount++] = SEG_CUBICTO;\r
+                       _coords [_coordsCount++] = x1;\r
+                       _coords [_coordsCount++] = y1;\r
+                       _coords [_coordsCount++] = x2;\r
+                       _coords [_coordsCount++] = y2;\r
+                       _coords [_coordsCount++] = x3;\r
+                       _coords [_coordsCount++] = y3;\r
+               }\r
+\r
+               public java.awt.Rectangle getBounds() \r
+               {\r
+                       return getBounds2D ().getBounds ();\r
+               }\r
+\r
+               public Rectangle2D getBounds2D() \r
+               {\r
+                       float x1, y1, x2, y2;\r
+                       int i = _coordsCount;\r
+                       if (i > 0) {\r
+                               y1 = y2 = _coords [--i];\r
+                               x1 = x2 = _coords [--i];\r
+                               while (i > 0) {\r
+                                       float y = _coords [--i];\r
+                                       float x = _coords [--i];\r
+                                       if (x < x1) x1 = x;\r
+                                       if (y < y1) y1 = y;\r
+                                       if (x > x2) x2 = x;\r
+                                       if (y > y2) y2 = y;\r
+                               }\r
+                       } \r
+                       else {\r
+                               x1 = y1 = x2 = y2 = 0f;\r
+                       }\r
+                       return new Rectangle2D.Float (x1, y1, x2 - x1, y2 - y1);\r
+               }\r
+\r
+               public Point2D getCurrentPoint() \r
+               {\r
+                       if (_typesCount < 1 || _coordsCount < 2)\r
+                               return null;\r
+                       \r
+                       int index = _coordsCount;\r
+                       if (_types [_typesCount - 1] == SEG_CLOSE)\r
+                               for (int i = _typesCount - 2; i > 0; i--) {\r
+                                       switch (_types [i]) {\r
+                                               case SEG_MOVETO:\r
+                                                       //break loop;\r
+                                                       goto loopend;\r
+                                               case SEG_LINETO:\r
+                                                       index -= 2;\r
+                                                       break;\r
+                                               case SEG_QUADTO:\r
+                                                       index -= 4;\r
+                                                       break;\r
+                                               case SEG_CUBICTO:\r
+                                                       index -= 6;\r
+                                                       break;\r
+                                               case SEG_CLOSE:\r
+                                                       break;\r
+                                       }\r
+                               }\r
+                       loopend:\r
+\r
+                       return new Point2D.Float (_coords [index - 2], _coords [index - 1]);\r
+               }\r
+\r
+               public PathIterator getPathIterator(AffineTransform at) {\r
+                       return new GeneralPathIterator (this, at);\r
+               }\r
+\r
+               public PathIterator getPathIterator(AffineTransform at, double flatness) {\r
+                       return new FlatteningPathIterator (getPathIterator (at), flatness);\r
+               }\r
+\r
+               public int getWindingRule() \r
+               {\r
+                       return _windingRule;\r
+               }\r
+\r
+               public bool intersects(double x, double y, double w, double h) \r
+               {\r
+                       return GeneralPath.intersects (x, y, w, h);\r
+               }\r
+\r
+               public bool intersects(Rectangle2D r) \r
+               {\r
+                       return intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());\r
+               }\r
+\r
+               public void lineTo(float x, float y) \r
+               {\r
+                       needRoom (1, 2, true);\r
+                       _types [_typesCount++] = SEG_LINETO;\r
+                       _coords [_coordsCount++] = x;\r
+                       _coords [_coordsCount++] = y;\r
+               }\r
+\r
+               public void moveTo(float x, float y) \r
+               {\r
+                       if (_typesCount > 0 && _types [_typesCount - 1] == SEG_MOVETO) {\r
+                               _coords [_coordsCount - 2] = x;\r
+                               _coords [_coordsCount - 1] = y;\r
+                       } \r
+                       else {\r
+                               needRoom (1, 2, false);\r
+                               _types [_typesCount++] = SEG_MOVETO;\r
+                               _coords [_coordsCount++] = x;\r
+                               _coords [_coordsCount++] = y;\r
+                       }\r
+               }\r
+\r
+               public void quadTo(float x1, float y1, float x2, float y2) \r
+               {\r
+                       needRoom (1, 4, true);\r
+                       _types [_typesCount++] = SEG_QUADTO;\r
+                       _coords [_coordsCount++] = x1;\r
+                       _coords [_coordsCount++] = y1;\r
+                       _coords [_coordsCount++] = x2;\r
+                       _coords [_coordsCount++] = y2;\r
+               }\r
+\r
+               public void reset() \r
+               {\r
+                       _typesCount = 0;\r
+                       _coordsCount = 0;\r
+               }\r
+\r
+               public void setWindingRule(int rule) \r
+               {\r
+                       if (rule != WIND_EVEN_ODD && rule != WIND_NON_ZERO) {\r
+                               throw new IllegalArgumentException ("winding rule must be WIND_EVEN_ODD or WIND_NON_ZERO");\r
+                       }\r
+                       _windingRule = rule;\r
+               }\r
+\r
+               public void transform(AffineTransform at) \r
+               {\r
+                       at.transform (_coords, 0, _coords, 0, _coordsCount/2);\r
+               }\r
+\r
+               private void needRoom(int newTypes, int newCoords, bool needMove) \r
+               {\r
+                       if (needMove && _typesCount == 0)\r
+                               throw new IllegalPathStateException ("missing initial moveto in path definition");\r
+                       \r
+                       int size = _coords.Length;\r
+                       if (_coordsCount + newCoords > size) {\r
+                               int grow = size;\r
+                               if (grow > EXPAND_MAX * 2)\r
+                                       grow = EXPAND_MAX * 2;\r
+                               \r
+                               if (grow < newCoords)\r
+                                       grow = newCoords;\r
+                               \r
+                               float [] arr = new float [size + grow];\r
+                               Array.Copy (_coords, 0, arr, 0, _coordsCount);\r
+                               _coords = arr;\r
+                       }\r
+                       size = _types.Length;\r
+                       if (_typesCount + newTypes > size) {\r
+                               int grow = size;\r
+                               if (grow > EXPAND_MAX)\r
+                                       grow = EXPAND_MAX;\r
+                               \r
+                               if (grow < newTypes)\r
+                                       grow = newTypes;\r
+                               \r
+                               sbyte [] arr = new sbyte [size + grow];\r
+                               Array.Copy (_types, 0, arr, 0, _typesCount);\r
+                               _types = arr;\r
+                       }\r
+               }\r
+\r
+               #endregion // GeneralPath\r
+\r
+               public void SetMarkers()\r
+               {\r
+                       Types [ TypesCount - 1] |= SEG_MARKER;\r
+               }\r
+\r
+               public void ClearMarkers()\r
+               {\r
+                       for (int i = 0; i < TypesCount; i++)\r
+                               Types [i] &= SEG_UNMARK_MASK;\r
+               }\r
+\r
+               #endregion //Methods\r
+\r
+               \r
+       }\r
+}\r
diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GeneralPathIterator.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/GeneralPathIterator.jvm.cs
new file mode 100644 (file)
index 0000000..77da636
--- /dev/null
@@ -0,0 +1,77 @@
+using System;\r
+\r
+using java.awt.geom;\r
+\r
+namespace System.Drawing.Drawing2D\r
+{\r
+       internal class GeneralPathIterator : PathIterator\r
+       {\r
+               #region Fields\r
+\r
+               int typeIdx = 0;\r
+               int pointIdx   = 0;\r
+               ExtendedGeneralPath _path;\r
+               AffineTransform _affine;\r
+\r
+               private static readonly int [] curvesize = {2, 2, 4, 6, 0};\r
+\r
+               #endregion // Fileds\r
+\r
+               #region Constructors\r
+\r
+               public GeneralPathIterator(ExtendedGeneralPath _path) : this (_path, null)\r
+               {\r
+               }\r
+\r
+               public GeneralPathIterator(ExtendedGeneralPath _path, AffineTransform at) \r
+               {\r
+                       this._path = _path;\r
+                       this._affine = at;\r
+               }\r
+\r
+               #endregion // Constructors\r
+\r
+               #region Methods\r
+\r
+               public int getWindingRule() \r
+               {\r
+                       return _path.getWindingRule ();\r
+               }\r
+\r
+               public bool isDone() \r
+               {\r
+                       return (typeIdx >= _path.TypesCount);\r
+               }\r
+\r
+               public void next() \r
+               {\r
+                       int type = _path.Types [typeIdx++] & ExtendedGeneralPath.SEG_MASK;\r
+                       pointIdx += curvesize [type];\r
+               }\r
+\r
+               public int currentSegment(float [] coords) {\r
+                       int type = _path.Types [typeIdx] & ExtendedGeneralPath.SEG_MASK;\r
+                       int numCoords = curvesize [type];\r
+                       if (numCoords > 0 && _affine != null)\r
+                               _affine.transform (_path.Coords, pointIdx, coords, 0, numCoords/2);\r
+                       else\r
+                               Array.Copy (_path.Coords, pointIdx, coords, 0, numCoords);\r
+                       return type;\r
+               }\r
+\r
+               public int currentSegment(double [] coords) \r
+               {\r
+                       int type = _path.Types [typeIdx] & ExtendedGeneralPath.SEG_MASK;\r
+                       int numCoords = curvesize [type];\r
+                       if (numCoords > 0 && _affine != null)\r
+                               _affine.transform (_path.Coords, pointIdx, coords, 0, numCoords/2);\r
+                       else \r
+                               for (int i=0; i < numCoords; i++)\r
+                                       coords [i] = _path.Coords [pointIdx + i];\r
+               \r
+                       return type;\r
+               }\r
+\r
+               #endregion // Methods\r
+       }  \r
+}\r
index 914164796f0484874afb0922575a5ddf7c32162f..b2ea90421244760ad70c5a7d440774112317dc56 100755 (executable)
@@ -9,29 +9,24 @@ namespace System.Drawing.Drawing2D
        public sealed class GraphicsPath : BasicShape, ICloneable\r
        {\r
                internal enum JPI {\r
-                       SEG_MOVETO = 0,\r
-                       SEG_LINETO = 1,\r
-                       SEG_QUADTO = 2,\r
-                       SEG_CUBICTO = 3,\r
-                       SEG_CLOSE = 4\r
+                       SEG_MOVETO = ExtendedGeneralPath.SEG_MOVETO,\r
+                       SEG_LINETO = ExtendedGeneralPath.SEG_LINETO,\r
+                       SEG_QUADTO = ExtendedGeneralPath.SEG_QUADTO,\r
+                       SEG_CUBICTO = ExtendedGeneralPath.SEG_CUBICTO,\r
+                       SEG_CLOSE = ExtendedGeneralPath.SEG_CLOSE\r
                }\r
 \r
-               #region Vars\r
-\r
-               bool _isNewFigure = true;\r
-               \r
-               #endregion\r
-\r
                #region Internal\r
-               internal GeneralPath NativeObject\r
+\r
+               internal ExtendedGeneralPath NativeObject\r
                {\r
                        get \r
                        {\r
-                               return (GeneralPath)Shape;\r
+                               return (ExtendedGeneralPath)Shape;\r
                        }\r
                }\r
 \r
-               GraphicsPath (GeneralPath ptr) : base(ptr)\r
+               GraphicsPath (ExtendedGeneralPath ptr) : base(ptr)\r
                {\r
                }\r
                #endregion\r
@@ -42,34 +37,67 @@ namespace System.Drawing.Drawing2D
                {\r
                }\r
                 \r
-               public GraphicsPath (FillMode fillMode) : this(new GeneralPath())\r
+               public GraphicsPath (FillMode fillMode) : this(new ExtendedGeneralPath ())\r
                {\r
                        FillMode = fillMode;\r
                }\r
                 \r
-               public GraphicsPath (Point[] pts, byte[] types) : this(null)\r
+               public GraphicsPath (Point[] pts, byte[] types) : this(pts, types, FillMode.Alternate)\r
                {\r
-                       throw new NotImplementedException();\r
                }\r
                 \r
-               public GraphicsPath (PointF[] pts, byte[] types) : this(null)\r
+               public GraphicsPath (PointF [] pts, byte [] types) : this(pts, types, FillMode.Alternate)\r
                {\r
-                       throw new NotImplementedException();\r
                }\r
                 \r
-               public GraphicsPath (Point[] pts, byte[] types, FillMode fillMode) : this(null)\r
+               public GraphicsPath (Point [] pts, byte [] types, FillMode fillMode) : this(new ExtendedGeneralPath ())\r
                {\r
-                       throw new NotImplementedException();            \r
-               }\r
-\r
-               public GraphicsPath (PointF[] pts, byte[] types, FillMode fillMode) : this(null)\r
-               {\r
-                       throw new NotImplementedException();\r
-               }\r
-       \r
-               GraphicsPath (GeneralPath path, bool isNewFigure) : this(path)\r
+                       FillMode = fillMode;\r
+                       for (int i=0; i < pts.Length; i++) {\r
+                               switch ((PathPointType)types [i]) {\r
+                                       case PathPointType.Start :\r
+                                               NativeObject.moveTo (pts [i].X, pts [i].Y);\r
+                                               break;\r
+                                       case PathPointType.Bezier3 :\r
+                                               float x1 = pts [i].X;\r
+                                               float y1 = pts [i].Y;\r
+                                               i++;\r
+                                               float x2 = pts [i].X;\r
+                                               float y2 = pts [i].Y;\r
+                                               i++;\r
+                                               float x3 = pts [i].X;\r
+                                               float y3 = pts [i].Y;\r
+                                               NativeObject.curveTo (x1,y1, x2, y2, x3, y3);\r
+                                               break;                                          \r
+                               }\r
+                               if (((PathPointType)types [i] & PathPointType.CloseSubpath) != 0)\r
+                                       NativeObject.closePath();\r
+                       }       \r
+               }\r
+\r
+               public GraphicsPath (PointF [] pts, byte [] types, FillMode fillMode) : this(new ExtendedGeneralPath ())\r
                {\r
-                       _isNewFigure = isNewFigure;\r
+                       FillMode = fillMode;\r
+                       for (int i=0; i < pts.Length; i++) {\r
+                               switch ((PathPointType)types [i]) {\r
+                                       case PathPointType.Start :\r
+                                               NativeObject.moveTo (pts [i].X, pts [i].Y);\r
+                                               break;\r
+                                       case PathPointType.Bezier3 :\r
+                                               float x1 = pts [i].X;\r
+                                               float y1 = pts [i].Y;\r
+                                               i++;\r
+                                               float x2 = pts [i].X;\r
+                                               float y2 = pts [i].Y;\r
+                                               i++;\r
+                                               float x3 = pts [i].X;\r
+                                               float y3 = pts [i].Y;\r
+                                               NativeObject.curveTo (x1,y1, x2, y2, x3, y3);\r
+                                               break;\r
+                               }\r
+                               if (((PathPointType)types [i] & PathPointType.CloseSubpath) != 0)\r
+                                       NativeObject.closePath();\r
+                       }\r
                }\r
 \r
                #endregion\r
@@ -77,7 +105,7 @@ namespace System.Drawing.Drawing2D
                #region Clone\r
                public object Clone ()\r
                {\r
-                       return new GraphicsPath ((GeneralPath)NativeObject.clone(), _isNewFigure);\r
+                       return new GraphicsPath ((ExtendedGeneralPath) NativeObject.Clone ());\r
                }\r
                #endregion\r
 \r
@@ -93,10 +121,10 @@ namespace System.Drawing.Drawing2D
 \r
                        set \r
                        {\r
-                               if(value == FillMode.Alternate)\r
-                                       NativeObject.setWindingRule(GeneralPath.WIND_NON_ZERO);\r
+                               if (value == FillMode.Alternate)\r
+                                       NativeObject.setWindingRule (GeneralPath.WIND_NON_ZERO);\r
                                else\r
-                                       NativeObject.setWindingRule(GeneralPath.WIND_EVEN_ODD);\r
+                                       NativeObject.setWindingRule (GeneralPath.WIND_EVEN_ODD);\r
                        }\r
                }\r
 \r
@@ -104,7 +132,48 @@ namespace System.Drawing.Drawing2D
                {\r
                        get \r
                        {\r
-                               throw new NotImplementedException();\r
+                               PathIterator iter = NativeObject.getPathIterator(null);\r
+                               PathData pathData = new PathData();\r
+                               pathData.Types = new byte [PointCount];\r
+                               pathData.Points = new PointF [PointCount];\r
+                               int tpos = 0;\r
+                               int ppos = 0;\r
+                               float [] jpoints = new float [6];\r
+                               while (!iter.isDone ()) {\r
+                                       //if (tpos == 0)\r
+                                       //      pathData.Types [tpos++] = PathPointType.Start;\r
+\r
+                                       JPI segmentType = (JPI)iter.currentSegment (jpoints);\r
+                                       switch (segmentType) {\r
+                                               case JPI.SEG_CLOSE:\r
+                                                       pathData.Types [tpos - 1] = (byte) (pathData.Types [tpos - 1] | (byte) PathPointType.CloseSubpath);\r
+                                                       break;\r
+                                               case JPI.SEG_MOVETO:\r
+                                                       pathData.Types [tpos++] = (byte) PathPointType.Start;\r
+                                                       pathData.Points [ppos++] = new PointF (jpoints [0], jpoints [1]);\r
+                                                       break;\r
+                                               case JPI.SEG_LINETO:\r
+                                                       pathData.Types [tpos++] = (byte) PathPointType.Line;\r
+                                                       pathData.Points [ppos++] = new PointF (jpoints [0], jpoints [1]);\r
+                                                       break;\r
+                                               case JPI.SEG_QUADTO:\r
+                                                       pathData.Types [tpos++] = (byte) PathPointType.Bezier;\r
+                                                       pathData.Points [ppos++] = new PointF (jpoints [0], jpoints [1]);\r
+                                                       pathData.Types [tpos++] = (byte) PathPointType.Bezier;\r
+                                                       pathData.Points [ppos++] = new PointF (jpoints [2], jpoints [3]);\r
+                                                       break;\r
+                                               case JPI.SEG_CUBICTO:\r
+                                                       pathData.Types [tpos++] = (byte) PathPointType.Bezier3;\r
+                                                       pathData.Points [ppos++] = new PointF (jpoints [0], jpoints [1]);\r
+                                                       pathData.Types [tpos++] = (byte) PathPointType.Bezier3;\r
+                                                       pathData.Points [ppos++] = new PointF (jpoints [2], jpoints [3]);\r
+                                                       pathData.Types [tpos++] = (byte) PathPointType.Bezier3;\r
+                                                       pathData.Points [ppos++] = new PointF (jpoints [4], jpoints [5]);\r
+                                                       break;\r
+                                       }               \r
+                                       iter.next ();\r
+                               }\r
+                               return pathData;\r
                        }\r
                }\r
 \r
@@ -131,8 +200,7 @@ namespace System.Drawing.Drawing2D
 \r
                        get \r
                        {\r
-                               //TODO\r
-                               throw new NotImplementedException();\r
+                               return NativeObject.CoordsCount / 2;\r
                        }\r
                }\r
                #endregion\r
@@ -169,8 +237,7 @@ namespace System.Drawing.Drawing2D
                                shape = new Arc2D.Double(x,y,width,height,-start,-extent,Arc2D.OPEN);\r
                        }\r
 \r
-                       NativeObject.append(shape,!_isNewFigure);\r
-                       _isNewFigure = false;\r
+                       NativeObject.append(shape);\r
                }\r
 \r
                /// <summary>\r
@@ -226,8 +293,7 @@ namespace System.Drawing.Drawing2D
                public void AddBezier (float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)\r
                {\r
                        CubicCurve2D cc = new CubicCurve2D.Float(x1,y1,x2,y2,x3,y3,x4,y4);\r
-                       NativeObject.append(cc,!_isNewFigure);\r
-                       _isNewFigure = false;\r
+                       NativeObject.append(cc);\r
                }\r
 \r
                public void AddBeziers (Point [] pts)\r
@@ -272,7 +338,6 @@ namespace System.Drawing.Drawing2D
                {\r
                        Ellipse2D e = new Ellipse2D.Float(x,y,width,height);\r
                        NativeObject.append(e,false);\r
-                       _isNewFigure = true;\r
                }\r
 \r
                public void AddEllipse (RectangleF r)\r
@@ -295,8 +360,7 @@ namespace System.Drawing.Drawing2D
                public void AddLine (float x1, float y1, float x2, float y2)\r
                {\r
                        Line2D l = new Line2D.Float(x1,y1,x2,y2);\r
-                       NativeObject.append(l,!_isNewFigure);\r
-                       _isNewFigure = false;\r
+                       NativeObject.append(l);\r
                }\r
 \r
                public void AddLine (Point a, Point b)\r
@@ -322,13 +386,11 @@ namespace System.Drawing.Drawing2D
                        if (points.Length == 0)\r
                                return;\r
 \r
-                       if (_isNewFigure)\r
+                       if (NativeObject.LastFigureClosed)\r
                                NativeObject.moveTo(points[0].X, points[0].Y);\r
                        else\r
                                NativeObject.lineTo(points[0].X, points[0].Y);\r
 \r
-                       _isNewFigure = false;\r
-\r
                        for (int i = 1; i < points.Length; i ++)\r
                                NativeObject.lineTo(points[i].X, points[i].Y);\r
                }\r
@@ -341,13 +403,11 @@ namespace System.Drawing.Drawing2D
                        if (points.Length == 0)\r
                                return;\r
 \r
-                       if (_isNewFigure)\r
+                       if (NativeObject.LastFigureClosed)\r
                                NativeObject.moveTo(points[0].X, points[0].Y);\r
                        else\r
                                NativeObject.lineTo(points[0].X, points[0].Y);\r
 \r
-                       _isNewFigure = false;\r
-\r
                        for (int i = 1; i < points.Length; i ++)\r
                                NativeObject.lineTo(points[i].X, points[i].Y);\r
                }\r
@@ -371,7 +431,6 @@ namespace System.Drawing.Drawing2D
                        }\r
 \r
                        NativeObject.append(shape,false);\r
-                       _isNewFigure = true;\r
                }\r
 \r
                public void AddPie (Rectangle rect, float startAngle, float sweepAngle)\r
@@ -400,7 +459,6 @@ namespace System.Drawing.Drawing2D
                                NativeObject.lineTo((float)points[i].X,(float)points[i].Y);\r
                        }\r
                        NativeObject.closePath();\r
-                       _isNewFigure = true;\r
                }\r
 \r
                public void AddPolygon (PointF [] points)\r
@@ -417,16 +475,19 @@ namespace System.Drawing.Drawing2D
                                NativeObject.lineTo(points[i].X,points[i].Y);\r
                        }\r
                        NativeObject.closePath();\r
-                       _isNewFigure = true;\r
                }\r
                #endregion\r
 \r
                #region AddRectangle(s)\r
                internal void AddRectangle(float x,float y, float w, float h)\r
                {\r
-                       Rectangle2D r = new Rectangle2D.Float(x,y,w,h);\r
-                       NativeObject.append(r,false);\r
-                       _isNewFigure = true;\r
+                       if (NativeObject.LastFigureClosed)\r
+                               NativeObject.moveTo(x, y);\r
+\r
+                       NativeObject.lineTo (x + w, y);\r
+                       NativeObject.lineTo (x + w, y + h);\r
+                       NativeObject.lineTo (x, y + h);\r
+                       NativeObject.closePath ();\r
                }\r
                public void AddRectangle (RectangleF rect)\r
                {\r
@@ -455,15 +516,17 @@ namespace System.Drawing.Drawing2D
                public void AddPath (GraphicsPath addingPath, bool connect)\r
                {\r
                        NativeObject.append(addingPath.NativeObject,connect);\r
-                       _isNewFigure = false;\r
                }\r
                #endregion\r
 \r
                #region GetLastPoint\r
                public PointF GetLastPoint ()\r
                {\r
-                       java.awt.geom.Point2D p2d = NativeObject.getCurrentPoint();\r
-                       return new PointF((float)p2d.getX(),(float)p2d.getY());\r
+                       int length = NativeObject.CoordsCount;\r
+                       if (length == 0)\r
+                               throw new System.ArgumentException ("Invalid parameter used.");\r
+\r
+                       return new PointF (NativeObject.Coords [length - 2], NativeObject.Coords [length - 1]);\r
                }\r
                #endregion\r
 \r
@@ -471,7 +534,6 @@ namespace System.Drawing.Drawing2D
                public void Reset ()\r
                {\r
                        NativeObject.reset();\r
-                       _isNewFigure = true;\r
                }\r
                #endregion\r
 \r
@@ -632,8 +694,7 @@ namespace System.Drawing.Drawing2D
                                pts[0] = points[0].X;\r
                        }\r
 \r
-                       AddCurve(pts, !_isNewFigure, tension);\r
-                       _isNewFigure = false;\r
+                       AddCurve(pts, !NativeObject.LastFigureClosed, tension);\r
                }\r
                 \r
                public void AddCurve (PointF [] points, int offset, int numberOfSegments, float tension)\r
@@ -659,8 +720,7 @@ namespace System.Drawing.Drawing2D
                                pts[0] = points[0].X;\r
                        }\r
 \r
-                       AddCurve(pts, !_isNewFigure, tension);\r
-                       _isNewFigure = false;\r
+                       AddCurve(pts, !NativeObject.LastFigureClosed, tension);\r
                }\r
 \r
                /// <summary>\r
@@ -739,7 +799,7 @@ namespace System.Drawing.Drawing2D
 \r
                public void CloseAllFigures()\r
                {\r
-                       GeneralPath p = new GeneralPath();\r
+                       ExtendedGeneralPath p = new ExtendedGeneralPath();\r
                        PathIterator pi = NativeObject.getPathIterator(null);\r
                        JPI lastSeg = JPI.SEG_CLOSE;\r
                        float [] points = new float[6];\r
@@ -774,6 +834,7 @@ namespace System.Drawing.Drawing2D
                                pi.next();\r
                        }\r
 \r
+                       p.closePath();\r
                        Shape = p;\r
                        //_isNewFigure = (lastSeg == PathIterator.SEG_CLOSE);\r
                }       \r
@@ -804,7 +865,7 @@ namespace System.Drawing.Drawing2D
 \r
                        //REVIEW. Perfomance reasons.\r
                        PathIterator pi = NativeObject.getPathIterator(tr,flatness);\r
-                       GeneralPath newPath = new GeneralPath();\r
+                       ExtendedGeneralPath newPath = new ExtendedGeneralPath();\r
                        newPath.append(pi,false);\r
                        Shape = newPath;\r
                }\r
@@ -862,7 +923,7 @@ namespace System.Drawing.Drawing2D
                #region StartFigure\r
                public void StartFigure()\r
                {\r
-                       _isNewFigure = true;\r
+                       NativeObject.Types [NativeObject.TypesCount - 1] |= ExtendedGeneralPath.SEG_START;\r
                }\r
                #endregion\r
                        \r
index cf808bc909421d9b23f05fd90bceb3d84ce399e9..ab62e2a99af0aed34322722dc401b7c02eb44830 100644 (file)
                                <File RelPath="System.Drawing.Drawing2D\CustomLineCap.jvm.cs" SubType="Code" BuildAction="Compile"/>\r
                                <File RelPath="System.Drawing.Drawing2D\DashCap.cs" SubType="Code" BuildAction="Compile"/>\r
                                <File RelPath="System.Drawing.Drawing2D\DashStyle.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="System.Drawing.Drawing2D\ExtendedGeneralPath.jvm.cs" SubType="Code" BuildAction="Compile"/>\r
                                <File RelPath="System.Drawing.Drawing2D\FillMode.cs" SubType="Code" BuildAction="Compile"/>\r
                                <File RelPath="System.Drawing.Drawing2D\FlushIntention.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="System.Drawing.Drawing2D\GeneralPathIterator.jvm.cs" SubType="Code" BuildAction="Compile"/>\r
                                <File RelPath="System.Drawing.Drawing2D\GraphicsContainer.cs" SubType="Code" BuildAction="Compile"/>\r
                                <File RelPath="System.Drawing.Drawing2D\GraphicsPath.jvm.cs" SubType="Code" BuildAction="Compile"/>\r
                                <File RelPath="System.Drawing.Drawing2D\GraphicsPathIterator.jvm.cs" SubType="Code" BuildAction="Compile"/>\r
index 5cc9ddc4722aeec270e0d2d45e36c6bbd61bc904..f515a985a0e9e9526c19b5090032f300fc4c7433 100644 (file)
@@ -1,3 +1,6 @@
+2005-08-10 Boris Kirzner <borisk@mainsoft.com>
+       * Test.dotnet.csproj, Test.vmwcsproj: Added GraphicsPath.cs.
+
 2005-08-09  Andrew Skiba <andrews@mainsoft.com>
 
        * Test.dotnet.csproj, Test.vmcsproj: add ColorConverter.cs and ColorTranslator.cs
index 8a389ebfb6e4772920fbeb2ab6ff9b8fc0cdafff..a7ea3d45fbcd2c867aedd24d314b937a395b1e8a 100644 (file)
@@ -1,3 +1,6 @@
+2005-08-10 Boris Kirzner <borisk@mainsoft.com>\r
+       * GraphicsPath.cs: Added new class. Test fixture for GraphicsPath.\r
+\r
 2005-08-08 Vladimir Krasnov <vladimirk@mainsoft.com>\r
        \r
        * Pen.cs: Added LineCaps and LineJoin tests\r
@@ -13,5 +16,6 @@
 \r
 Andrew Skiba <andrews@mainsoft.com>\r
 \r
-       * Test.dotnet.csproj, Test.vmwcsproj: move project to sys.drawing/Test so it's easy to include Mono tests\r
+       * Test.dotnet.csproj, Test.vmwcsproj: move project to sys.drawing/Test so\r
+       it's easy to include Mono tests\r
 \r
diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/GraphicsPath.cs b/mcs/class/System.Drawing/Test/DrawingTest/Test/GraphicsPath.cs
new file mode 100644 (file)
index 0000000..9450ca7
--- /dev/null
@@ -0,0 +1,5470 @@
+using System;\r
+using System.Drawing;\r
+using System.Drawing.Drawing2D;\r
+using NUnit.Framework;\r
+using DrawingTestHelper;\r
+\r
+namespace Test.Sys.Drawing\r
+{\r
+       [TestFixture]\r
+       public class GraphicsPathFixture\r
+       {\r
+               DrawingTest t;\r
+               GraphicsPath path;\r
+               Pen p;\r
+\r
+               [SetUp]\r
+               public void SetUp () {\r
+                       DrawingTest.ShowForms = false;\r
+                       t = DrawingTest.Create (512, 512);\r
+                       p = new Pen (Color.Blue);\r
+                       p.Width = 2;\r
+               }\r
+\r
+               [Test]\r
+               public void ctor_void()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       Assert.AreEqual (FillMode.Alternate, path.FillMode);\r
+                       Assert.AreEqual (0, path.PathData.Points.Length);\r
+                       Assert.AreEqual (0, path.PointCount);\r
+               }\r
+\r
+               [Test]\r
+               public void ctor_FillMode()\r
+               {\r
+                       path = new GraphicsPath (FillMode.Alternate);\r
+                       Assert.AreEqual (FillMode.Alternate, path.FillMode);\r
+                       Assert.AreEqual (0, path.PathData.Points.Length);\r
+                       Assert.AreEqual (0, path.PointCount);\r
+\r
+                       path = new GraphicsPath (FillMode.Winding);\r
+                       Assert.AreEqual (FillMode.Winding, path.FillMode);\r
+                       Assert.AreEqual (0, path.PathData.Points.Length);\r
+                       Assert.AreEqual (0, path.PointCount);\r
+               }\r
+\r
+               [Test]\r
+               public void ctor_PointArr_ByteArr()\r
+               {\r
+                       Point [] points = new Point [] {        new Point (0, 0), \r
+                                                                                               new Point (250, 250), \r
+                                                                                               new Point (60, 70),\r
+                                                                                               new Point (230, 10)};\r
+\r
+                       byte [] types = new byte [] {(byte) PathPointType.Start,\r
+                                                                               (byte) PathPointType.Bezier3,\r
+                                                                               (byte) PathPointType.Bezier3,\r
+                                                                               (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)};\r
+\r
+                       path = new GraphicsPath (points, types);\r
+\r
+                       Assert.AreEqual (FillMode.Alternate, path.FillMode);\r
+                       Assert.AreEqual (4, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF (0f, 0f), \r
+                                                                                                               new PointF (250f, 250f), \r
+                                                                                                               new PointF (60f, 70f),\r
+                                                                                                               new PointF (230f, 10f)};\r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               Assert.AreEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = types;\r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               Assert.AreEqual(expectedTypes [i], path.PathTypes [i]);\r
+                       }\r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void ctor_PointFArr_ByteArr()\r
+               {\r
+                       PointF [] points = new PointF [] {      new PointF (100.1f, 200.2f), \r
+                                                                                               new PointF (10.2f, 150.6f),\r
+                                                                                               new PointF (60.3f, 70.7f),\r
+                                                                                               new PointF (250.4f, 10.7f)};\r
+\r
+                       byte [] types = new byte [] {(byte) PathPointType.Start,\r
+                                                                               (byte) PathPointType.Bezier3,\r
+                                                                               (byte) PathPointType.Bezier3,\r
+                                                                               (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)};\r
+\r
+                       path = new GraphicsPath (points, types, FillMode.Alternate);\r
+\r
+                       Assert.AreEqual (FillMode.Alternate, path.FillMode);\r
+                       Assert.AreEqual (4, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = points;\r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               Assert.AreEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = types;\r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               Assert.AreEqual(expectedTypes [i], path.PathTypes [i]);\r
+                       }\r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void ctor_PointArr_ByteArr_FillMode()\r
+               {\r
+                       Point [] points = new Point [] {new Point (0, 0), \r
+                                                                                       new Point (250, 250), \r
+                                                                                       new Point (60, 70),\r
+                                                                                       new Point (230, 10)};\r
+\r
+                       byte [] types = new byte [] {   (byte) PathPointType.Start,\r
+                                                                                       (byte) PathPointType.Bezier3,\r
+                                                                                       (byte) PathPointType.Bezier3,\r
+                                                                                       (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)};\r
+\r
+                       path = new GraphicsPath (points, types, FillMode.Alternate);\r
+\r
+                       Assert.AreEqual (FillMode.Alternate, path.FillMode);\r
+                       Assert.AreEqual (4, path.PointCount);\r
+\r
+                       t.Graphics.DrawPath(p, path);\r
+                       t.Show();\r
+\r
+                       path = new GraphicsPath (points, types, FillMode.Winding);\r
+\r
+                       Assert.AreEqual (FillMode.Winding, path.FillMode);\r
+                       Assert.AreEqual (4, path.PointCount);\r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void ctor_PointFArr_ByteArr_FillMode()\r
+               {\r
+                       PointF [] points = new PointF [] {      new PointF (100.1f, 200.2f), \r
+                                                                                               new PointF (10.2f, 150.6f),\r
+                                                                                               new PointF (60.3f, 70.7f),\r
+                                                                                               new PointF (250.4f, 10.7f)};\r
+\r
+                       byte [] types = new byte [] {   (byte) PathPointType.Start,\r
+                                                                                       (byte) PathPointType.Bezier3,\r
+                                                                                       (byte) PathPointType.Bezier3,\r
+                                                                                       (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)};\r
+\r
+                       path = new GraphicsPath (points, types, FillMode.Alternate);\r
+\r
+                       Assert.AreEqual (FillMode.Alternate, path.FillMode);\r
+                       Assert.AreEqual (4, path.PointCount);\r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show();\r
+\r
+                       path = new GraphicsPath (points, types, FillMode.Winding);\r
+\r
+                       Assert.AreEqual (FillMode.Winding, path.FillMode);\r
+                       Assert.AreEqual (4, path.PointCount);\r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddArc_Rectangle_Float_Float()\r
+               {\r
+                       path = new GraphicsPath ();\r
+\r
+                       path.AddArc (new Rectangle (50, 50, 150, 170), 10.34f, 240.15f);\r
+\r
+                       Assert.AreEqual (10, path.PointCount);\r
+\r
+                       path.AddArc (new Rectangle (50, 50, 70, 95), -45.001f, 135.87f);\r
+\r
+                       Assert.AreEqual (17, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(199.0466f, 148.5099f), \r
+                                                                                                               new PointF(192.4631f, 194.8574f), \r
+                                                                                                               new PointF(153.9743f, 226.3808f), \r
+                                                                                                               new PointF(113.0795f, 218.9195f), \r
+                                                                                                               new PointF(72.18465f, 211.4582f), \r
+                                                                                                               new PointF(44.36986f, 167.8375f), \r
+                                                                                                               new PointF(50.95338f, 121.4901f), \r
+                                                                                                               new PointF(55.13617f, 92.0436f), \r
+                                                                                                               new PointF(72.63087f, 67.23608f), \r
+                                                                                                               new PointF(97.05219f, 56.12194f), \r
+                                                                                                               new PointF(113.1766f, 69.32237f), \r
+                                                                                                               new PointF(124.6434f, 90.44156f), \r
+                                                                                                               new PointF(121.324f, 120.1776f), \r
+                                                                                                               new PointF(105.7625f, 135.7396f), \r
+                                                                                                               new PointF(99.54897f, 141.9534f), \r
+                                                                                                               new PointF(91.99629f, 145.2055f), \r
+                                                                                                               new PointF(84.27972f, 144.9899f)};\r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [17] { (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3 }; \r
+\r
+                       for (int i = 0; i < path.PointCount; i++) {\r
+                               Assert.AreEqual(expectedTypes [i], path.PathTypes [i]);\r
+                       }\r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void AddArc_RectangleF_Float_Float()\r
+               {\r
+                       path = new GraphicsPath ();\r
+\r
+                       path.AddArc (new RectangleF (20.02f, 30.56f, 150.67f, 170.34f), 10.34f, 240.15f);\r
+\r
+                       Assert.AreEqual (10, path.PointCount);\r
+\r
+                       path.AddArc (new RectangleF (50.09f, 50.345f, 70.15f, 95.98f), -45.001f, 135.87f);\r
+\r
+                       Assert.AreEqual (17, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(169.7277f, 129.2994f), \r
+                                                                                                               new PointF(163.0989f, 175.7367f), \r
+                                                                                                               new PointF(124.4274f, 207.3063f), \r
+                                                                                                               new PointF(83.3525f, 199.8121f), \r
+                                                                                                               new PointF(42.27758f, 192.3179f), \r
+                                                                                                               new PointF(14.35347f, 148.5978f), \r
+                                                                                                               new PointF(20.98226f, 102.1606f), \r
+                                                                                                               new PointF(25.1958f, 72.64315f), \r
+                                                                                                               new PointF(42.79146f, 47.78527f), \r
+                                                                                                               new PointF(67.34177f, 36.66724f), \r
+                                                                                                               new PointF(113.4824f, 70.01659f), \r
+                                                                                                               new PointF(124.9132f, 91.4144f), \r
+                                                                                                               new PointF(121.5016f, 121.4393f), \r
+                                                                                                               new PointF(105.8624f, 137.0791f), \r
+                                                                                                               new PointF(99.65379f, 143.288f), \r
+                                                                                                               new PointF(92.12586f, 146.533f), \r
+                                                                                                               new PointF(84.43728f, 146.3147f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier }; \r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }                       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddArc_Int_Int_Int_Int_Float_Float()\r
+               {\r
+                       path = new GraphicsPath ();\r
+\r
+                       path.AddArc (50, 50, 150, 170, 10.34f, 240.15f);\r
+\r
+                       Assert.AreEqual (10, path.PointCount);\r
+\r
+                       path.AddArc (50, 50, 70, 95, -45.001f, 135.87f);\r
+\r
+                       Assert.AreEqual (17, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(199.0466f, 148.5099f), \r
+                                                                                                               new PointF(192.4631f, 194.8574f), \r
+                                                                                                               new PointF(153.9743f, 226.3808f), \r
+                                                                                                               new PointF(113.0795f, 218.9195f), \r
+                                                                                                               new PointF(72.18465f, 211.4582f), \r
+                                                                                                               new PointF(44.36986f, 167.8375f), \r
+                                                                                                               new PointF(50.95338f, 121.4901f), \r
+                                                                                                               new PointF(55.13617f, 92.0436f), \r
+                                                                                                               new PointF(72.63087f, 67.23608f), \r
+                                                                                                               new PointF(97.05219f, 56.12194f), \r
+                                                                                                               new PointF(113.1766f, 69.32237f), \r
+                                                                                                               new PointF(124.6434f, 90.44156f), \r
+                                                                                                               new PointF(121.324f, 120.1776f), \r
+                                                                                                               new PointF(105.7625f, 135.7396f), \r
+                                                                                                               new PointF(99.54897f, 141.9534f), \r
+                                                                                                               new PointF(91.99629f, 145.2055f), \r
+                                                                                                               new PointF(84.27972f, 144.9899f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }                       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void AddArc_Float_Float_Float_Float_Float_Float()\r
+               {\r
+                       path = new GraphicsPath ();\r
+\r
+                       path.AddArc (20.02f, 30.56f, 150.67f, 170.34f, 10.34f, 240.15f);\r
+\r
+                       Assert.AreEqual (10, path.PointCount);\r
+\r
+                       path.AddArc (50.09f, 50.345f, 70.15f, 95.98f, -45.001f, 135.87f);\r
+\r
+                       Assert.AreEqual (17, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(169.7277f, 129.2994f), \r
+                                                                                                               new PointF(163.0989f, 175.7367f), \r
+                                                                                                               new PointF(124.4274f, 207.3063f), \r
+                                                                                                               new PointF(83.3525f, 199.8121f), \r
+                                                                                                               new PointF(42.27758f, 192.3179f), \r
+                                                                                                               new PointF(14.35347f, 148.5978f), \r
+                                                                                                               new PointF(20.98226f, 102.1606f), \r
+                                                                                                               new PointF(25.1958f, 72.64315f), \r
+                                                                                                               new PointF(42.79146f, 47.78527f), \r
+                                                                                                               new PointF(67.34177f, 36.66724f), \r
+                                                                                                               new PointF(113.4824f, 70.01659f), \r
+                                                                                                               new PointF(124.9132f, 91.4144f), \r
+                                                                                                               new PointF(121.5016f, 121.4393f), \r
+                                                                                                               new PointF(105.8624f, 137.0791f), \r
+                                                                                                               new PointF(99.65379f, 143.288f), \r
+                                                                                                               new PointF(92.12586f, 146.533f), \r
+                                                                                                               new PointF(84.43728f, 146.3147f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }                       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddBezier_Point_Point_Point_Point()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddBezier( new Point (10, 10),\r
+                                                       new Point (50, 250),\r
+                                                       new Point (100, 5),\r
+                                                       new Point (200, 280));\r
+\r
+                       Assert.AreEqual (4, path.PointCount);\r
+\r
+                       path.AddBezier( new Point (0, 210),\r
+                                                       new Point (50, 6),\r
+                                                       new Point (150, 150),\r
+                                                       new Point (250, 10));\r
+\r
+                       Assert.AreEqual (8, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(10f, 10f), \r
+                                                                                                               new PointF(50f, 250f), \r
+                                                                                                               new PointF(100f, 5f), \r
+                                                                                                               new PointF(200f, 280f), \r
+                                                                                                               new PointF(0f, 210f), \r
+                                                                                                               new PointF(50f, 6f), \r
+                                                                                                               new PointF(150f, 150f), \r
+                                                                                                               new PointF(250f, 10f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }                                               \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddBezier_PointF_PointF_PointF_PointF()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddBezier( new PointF (10.01f, 10.02f),\r
+                                                       new PointF (50.3f, 250.4f),\r
+                                                       new PointF (100.005f, 5.006f),\r
+                                                       new PointF (200.78f, 280.90f));\r
+\r
+                       Assert.AreEqual (4, path.PointCount);\r
+\r
+                       path.AddBezier( new PointF (0.15f, 210.23f),\r
+                                                       new PointF (50.34f, 6.45f),\r
+                                                       new PointF (150.65f, 150.87f),\r
+                                                       new PointF (250.0001f, 10.2345f));\r
+\r
+                       Assert.AreEqual (8, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF (10.01f, 10.02f),\r
+                                                                                                               new PointF (50.3f, 250.4f),\r
+                                                                                                               new PointF (100.005f, 5.006f),\r
+                                                                                                               new PointF (200.78f, 280.90f), \r
+                                                                                                               new PointF (0.15f, 210.23f),\r
+                                                                                                               new PointF (50.34f, 6.45f),\r
+                                                                                                               new PointF (150.65f, 150.87f),\r
+                                                                                                               new PointF (250.0001f, 10.2345f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddBezier_Int_Int_Int_Int_Int_Int_Int_Int()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+\r
+                       Assert.AreEqual (4, path.PointCount);\r
+\r
+                       path.AddBezier( 0, 210, 50, 6, 150, 150, 250, 10);\r
+\r
+                       Assert.AreEqual (8, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(10f, 10f), \r
+                                                                                                               new PointF(50f, 250f), \r
+                                                                                                               new PointF(100f, 5f), \r
+                                                                                                               new PointF(200f, 280f), \r
+                                                                                                               new PointF(0f, 210f), \r
+                                                                                                               new PointF(50f, 6f), \r
+                                                                                                               new PointF(150f, 150f), \r
+                                                                                                               new PointF(250f, 10f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }                                                       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddBezier_Float_Float_Float_Float_Float_Float_Float_Float()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddBezier( 10.01f, 10.02f, 50.3f, 250.4f, 100.005f, 5.006f, 200.78f, 280.90f);\r
+\r
+                       Assert.AreEqual (4, path.PointCount);\r
+\r
+                       path.AddBezier( 0.15f, 210.23f, 50.34f, 6.45f, 150.65f, 150.87f, 250.0001f, 10.2345f);\r
+\r
+                       Assert.AreEqual (8, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF (10.01f, 10.02f),\r
+                                                                                                               new PointF (50.3f, 250.4f),\r
+                                                                                                               new PointF (100.005f, 5.006f),\r
+                                                                                                               new PointF (200.78f, 280.90f), \r
+                                                                                                               new PointF (0.15f, 210.23f),\r
+                                                                                                               new PointF (50.34f, 6.45f),\r
+                                                                                                               new PointF (150.65f, 150.87f),\r
+                                                                                                               new PointF (250.0001f, 10.2345f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }\r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddBeziers_PointArr()\r
+               {\r
+                       Point [] points = new Point [] {new Point(20, 100),\r
+                                                                                       new Point(40, 75),\r
+                                                                                       new Point(60, 125),\r
+                                                                                       new Point(80, 100),\r
+                                                                                       new Point(100, 50),\r
+                                                                                       new Point(120, 150),\r
+                                                                                       new Point(140, 100)};\r
+\r
+                       path = new GraphicsPath();\r
+                       path.AddBeziers(points);\r
+\r
+                       Assert.AreEqual (7, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20f, 100f), \r
+                                                                                                               new PointF(40f, 75f), \r
+                                                                                                               new PointF(60f, 125f), \r
+                                                                                                               new PointF(80f, 100f), \r
+                                                                                                               new PointF(100f, 50f), \r
+                                                                                                               new PointF(120f, 150f), \r
+                                                                                                               new PointF(140f, 100f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }                                                       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddBeziers_PointFArr()\r
+               {\r
+                       PointF [] points = new PointF [] {      new PointF(20.01f, 100.1f),\r
+                                                                                               new PointF(40.02f, 75.2f),\r
+                                                                                               new PointF(60.03f, 125.3f),\r
+                                                                                               new PointF(80.04f, 100.4f),\r
+                                                                                               new PointF(100.05f, 50.5f),\r
+                                                                                               new PointF(120.06f, 150.6f),\r
+                                                                                               new PointF(140.07f, 100.7f)};\r
+\r
+                       path = new GraphicsPath();\r
+                       path.AddBeziers(points);\r
+\r
+                       Assert.AreEqual (7, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20.01f, 100.1f),\r
+                                                                                                               new PointF(40.02f, 75.2f),\r
+                                                                                                               new PointF(60.03f, 125.3f),\r
+                                                                                                               new PointF(80.04f, 100.4f),\r
+                                                                                                               new PointF(100.05f, 50.5f),\r
+                                                                                                               new PointF(120.06f, 150.6f),\r
+                                                                                                               new PointF(140.07f, 100.7f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }                                                               \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddClosedCurve_PointArr()\r
+               {\r
+                       Point [] points = new Point [] {new Point(20, 100),\r
+                                                                                       new Point(40, 75),\r
+                                                                                       new Point(60, 125),\r
+                                                                                       new Point(80, 100),\r
+                                                                                       new Point(100, 50),\r
+                                                                                       new Point(120, 150),\r
+                                                                                       new Point(140, 100)};\r
+\r
+                       path = new GraphicsPath();\r
+                       path.AddClosedCurve(points);\r
+\r
+                       Assert.AreEqual (22, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20f, 100f), \r
+                                                                                                               new PointF(3.333333f, 95.83333f), \r
+                                                                                                               new PointF(33.33333f, 70.83333f), \r
+                                                                                                               new PointF(40f, 75f), \r
+                                                                                                               new PointF(46.66666f, 79.16666f), \r
+                                                                                                               new PointF(53.33333f, 120.8333f), \r
+                                                                                                               new PointF(60f, 125f), \r
+                                                                                                               new PointF(66.66666f, 129.1667f), \r
+                                                                                                               new PointF(73.33333f, 112.5f), \r
+                                                                                                               new PointF(80f, 100f), \r
+                                                                                                               new PointF(86.66666f, 87.49999f), \r
+                                                                                                               new PointF(93.33333f, 41.66666f), \r
+                                                                                                               new PointF(100f, 50f), \r
+                                                                                                               new PointF(106.6667f, 58.33333f), \r
+                                                                                                               new PointF(113.3333f, 141.6667f), \r
+                                                                                                               new PointF(120f, 150f), \r
+                                                                                                               new PointF(126.6667f, 158.3333f), \r
+                                                                                                               new PointF(156.6667f, 108.3333f), \r
+                                                                                                               new PointF(140f, 100f), \r
+                                                                                                               new PointF(123.3333f, 91.66666f), \r
+                                                                                                               new PointF(36.66666f, 104.1667f), \r
+                                                                                                               new PointF(20f, 100f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddClosedCurve_PointFArr()\r
+               {\r
+                       PointF [] points = new PointF [] {      new PointF(20.01f, 100.1f),\r
+                                                                                               new PointF(40.02f, 75.2f),\r
+                                                                                               new PointF(60.03f, 125.3f),\r
+                                                                                               new PointF(80.04f, 100.4f),\r
+                                                                                               new PointF(100.05f, 50.5f),\r
+                                                                                               new PointF(120.06f, 150.6f),\r
+                                                                                               new PointF(140.07f, 100.7f)};\r
+\r
+                       path = new GraphicsPath();\r
+                       path.AddClosedCurve(points);\r
+\r
+                       Assert.AreEqual (22, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20.01f, 100.1f), \r
+                                                                                                               new PointF(3.334998f, 95.84999f), \r
+                                                                                                               new PointF(33.35f, 70.99999f), \r
+                                                                                                               new PointF(40.02f, 75.2f), \r
+                                                                                                               new PointF(46.69f, 79.39999f), \r
+                                                                                                               new PointF(53.36f, 121.1f), \r
+                                                                                                               new PointF(60.03f, 125.3f), \r
+                                                                                                               new PointF(66.7f, 129.5f), \r
+                                                                                                               new PointF(73.37f, 112.8667f), \r
+                                                                                                               new PointF(80.04f, 100.4f), \r
+                                                                                                               new PointF(86.71f, 87.93333f), \r
+                                                                                                               new PointF(93.38f, 42.13333f), \r
+                                                                                                               new PointF(100.05f, 50.5f), \r
+                                                                                                               new PointF(106.72f, 58.86666f), \r
+                                                                                                               new PointF(113.39f, 142.2333f), \r
+                                                                                                               new PointF(120.06f, 150.6f), \r
+                                                                                                               new PointF(126.73f, 158.9667f), \r
+                                                                                                               new PointF(156.745f, 109.1167f), \r
+                                                                                                               new PointF(140.07f, 100.7f), \r
+                                                                                                               new PointF(123.395f, 92.28333f), \r
+                                                                                                               new PointF(36.685f, 104.35f), \r
+                                                                                                               new PointF(20.01f, 100.1f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddClosedCurve_PointArr_Float()\r
+               {\r
+                       Point [] points = new Point [] {new Point(20, 100),\r
+                                                                                       new Point(40, 75),\r
+                                                                                       new Point(60, 125),\r
+                                                                                       new Point(80, 100),\r
+                                                                                       new Point(100, 50),\r
+                                                                                       new Point(120, 150),\r
+                                                                                       new Point(140, 100)};\r
+\r
+                       path = new GraphicsPath();\r
+                       path.AddClosedCurve(points, 0.9f);\r
+\r
+                       Assert.AreEqual (22, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20f, 100f), \r
+                                                                                                               new PointF(-10f, 92.49999f), \r
+                                                                                                               new PointF(28f, 67.49999f), \r
+                                                                                                               new PointF(40f, 75f), \r
+                                                                                                               new PointF(52f, 82.5f), \r
+                                                                                                               new PointF(48f, 117.5f), \r
+                                                                                                               new PointF(60f, 125f), \r
+                                                                                                               new PointF(72f, 132.5f), \r
+                                                                                                               new PointF(67.99999f, 122.5f), \r
+                                                                                                               new PointF(80f, 100f), \r
+                                                                                                               new PointF(92f, 77.49999f), \r
+                                                                                                               new PointF(87.99999f, 35f), \r
+                                                                                                               new PointF(100f, 50f), \r
+                                                                                                               new PointF(112f, 65f), \r
+                                                                                                               new PointF(108f, 135f), \r
+                                                                                                               new PointF(120f, 150f), \r
+                                                                                                               new PointF(132f, 165f), \r
+                                                                                                               new PointF(170f, 115f), \r
+                                                                                                               new PointF(140f, 100f), \r
+                                                                                                               new PointF(110f, 84.99999f), \r
+                                                                                                               new PointF(50f, 107.5f), \r
+                                                                                                               new PointF(20f, 100f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddClosedCurve_PointFArr_Float()\r
+               {\r
+                       PointF [] points = new PointF [] {      new PointF(20.01f, 100.1f),\r
+                                                                                               new PointF(40.02f, 75.2f),\r
+                                                                                               new PointF(60.03f, 125.3f),\r
+                                                                                               new PointF(80.04f, 100.4f),\r
+                                                                                               new PointF(100.05f, 50.5f),\r
+                                                                                               new PointF(120.06f, 150.6f),\r
+                                                                                               new PointF(140.07f, 100.7f)};\r
+\r
+                       path = new GraphicsPath();\r
+                       path.AddClosedCurve(points, 0.8f);\r
+\r
+                       Assert.AreEqual (22, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20.01f, 100.1f), \r
+                                                                                                               new PointF(-6.670003f, 93.3f), \r
+                                                                                                               new PointF(29.348f, 68.47999f), \r
+                                                                                                               new PointF(40.02f, 75.2f), \r
+                                                                                                               new PointF(50.692f, 81.92f), \r
+                                                                                                               new PointF(49.358f, 118.58f), \r
+                                                                                                               new PointF(60.03f, 125.3f), \r
+                                                                                                               new PointF(70.702f, 132.02f), \r
+                                                                                                               new PointF(69.368f, 120.3467f), \r
+                                                                                                               new PointF(80.04f, 100.4f), \r
+                                                                                                               new PointF(90.712f, 80.45333f), \r
+                                                                                                               new PointF(89.378f, 37.11333f), \r
+                                                                                                               new PointF(100.05f, 50.5f), \r
+                                                                                                               new PointF(110.722f, 63.88667f), \r
+                                                                                                               new PointF(109.388f, 137.2133f), \r
+                                                                                                               new PointF(120.06f, 150.6f), \r
+                                                                                                               new PointF(130.732f, 163.9867f), \r
+                                                                                                               new PointF(166.75f, 114.1667f), \r
+                                                                                                               new PointF(140.07f, 100.7f), \r
+                                                                                                               new PointF(113.39f, 87.23332f), \r
+                                                                                                               new PointF(46.69f, 106.9f), \r
+                                                                                                               new PointF(20.01f, 100.1f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddCurve_PointArr()\r
+               {\r
+                       Point [] points = new Point [] {new Point(20, 100),\r
+                                                                                       new Point(40, 75),\r
+                                                                                       new Point(60, 125),\r
+                                                                                       new Point(80, 100),\r
+                                                                                       new Point(100, 50),\r
+                                                                                       new Point(120, 150),\r
+                                                                                       new Point(140, 100)};\r
+\r
+                       path = new GraphicsPath();\r
+                       path.AddCurve(points);\r
+\r
+                       Assert.AreEqual (19, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20f, 100f), \r
+                                                                                                               new PointF(23.33333f, 95.83333f), \r
+                                                                                                               new PointF(33.33333f, 70.83333f), \r
+                                                                                                               new PointF(40f, 75f), \r
+                                                                                                               new PointF(46.66666f, 79.16666f), \r
+                                                                                                               new PointF(53.33333f, 120.8333f), \r
+                                                                                                               new PointF(60f, 125f), \r
+                                                                                                               new PointF(66.66666f, 129.1667f), \r
+                                                                                                               new PointF(73.33333f, 112.5f), \r
+                                                                                                               new PointF(80f, 100f), \r
+                                                                                                               new PointF(86.66666f, 87.49999f), \r
+                                                                                                               new PointF(93.33333f, 41.66666f), \r
+                                                                                                               new PointF(100f, 50f), \r
+                                                                                                               new PointF(106.6667f, 58.33333f), \r
+                                                                                                               new PointF(113.3333f, 141.6667f), \r
+                                                                                                               new PointF(120f, 150f), \r
+                                                                                                               new PointF(126.6667f, 158.3333f), \r
+                                                                                                               new PointF(136.6667f, 108.3333f), \r
+                                                                                                               new PointF(140f, 100f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddCurve_PointFArr()\r
+               {\r
+                       PointF [] points = new PointF [] {      new PointF(20.01f, 100.1f),\r
+                                                                                               new PointF(40.02f, 75.2f),\r
+                                                                                               new PointF(60.03f, 125.3f),\r
+                                                                                               new PointF(80.04f, 100.4f),\r
+                                                                                               new PointF(100.05f, 50.5f),\r
+                                                                                               new PointF(120.06f, 150.6f),\r
+                                                                                               new PointF(140.07f, 100.7f)};\r
+\r
+                       path = new GraphicsPath();\r
+                       path.AddCurve(points);\r
+\r
+                       Assert.AreEqual (19, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20.01f, 100.1f), \r
+                                                                                                               new PointF(23.345f, 95.95f), \r
+                                                                                                               new PointF(33.35f, 70.99999f), \r
+                                                                                                               new PointF(40.02f, 75.2f), \r
+                                                                                                               new PointF(46.69f, 79.39999f), \r
+                                                                                                               new PointF(53.36f, 121.1f), \r
+                                                                                                               new PointF(60.03f, 125.3f), \r
+                                                                                                               new PointF(66.7f, 129.5f), \r
+                                                                                                               new PointF(73.37f, 112.8667f), \r
+                                                                                                               new PointF(80.04f, 100.4f), \r
+                                                                                                               new PointF(86.71f, 87.93333f), \r
+                                                                                                               new PointF(93.38f, 42.13333f), \r
+                                                                                                               new PointF(100.05f, 50.5f), \r
+                                                                                                               new PointF(106.72f, 58.86666f), \r
+                                                                                                               new PointF(113.39f, 142.2333f), \r
+                                                                                                               new PointF(120.06f, 150.6f), \r
+                                                                                                               new PointF(126.73f, 158.9667f), \r
+                                                                                                               new PointF(136.735f, 109.0167f), \r
+                                                                                                               new PointF(140.07f, 100.7f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddCurve_PointArr_Float()\r
+               {\r
+                       Point [] points = new Point [] {new Point(20, 100),\r
+                                                                                       new Point(40, 75),\r
+                                                                                       new Point(60, 125),\r
+                                                                                       new Point(80, 100),\r
+                                                                                       new Point(100, 50),\r
+                                                                                       new Point(120, 150),\r
+                                                                                       new Point(140, 100)};\r
+\r
+                       path = new GraphicsPath();\r
+                       path.AddCurve(points, 0.9f);\r
+\r
+                       Assert.AreEqual (19, path.PointCount);\r
+                       \r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20f, 100f), \r
+                                                                                                               new PointF(26f, 92.49999f), \r
+                                                                                                               new PointF(28f, 67.49999f), \r
+                                                                                                               new PointF(40f, 75f), \r
+                                                                                                               new PointF(52f, 82.5f), \r
+                                                                                                               new PointF(48f, 117.5f), \r
+                                                                                                               new PointF(60f, 125f), \r
+                                                                                                               new PointF(72f, 132.5f), \r
+                                                                                                               new PointF(67.99999f, 122.5f), \r
+                                                                                                               new PointF(80f, 100f), \r
+                                                                                                               new PointF(92f, 77.49999f), \r
+                                                                                                               new PointF(87.99999f, 35f), \r
+                                                                                                               new PointF(100f, 50f), \r
+                                                                                                               new PointF(112f, 65f), \r
+                                                                                                               new PointF(108f, 135f), \r
+                                                                                                               new PointF(120f, 150f), \r
+                                                                                                               new PointF(132f, 165f), \r
+                                                                                                               new PointF(134f, 115f), \r
+                                                                                                               new PointF(140f, 100f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddCurve_PointFArr_Float()\r
+               {\r
+                       PointF [] points = new PointF [] {      new PointF(20.01f, 100.1f),\r
+                                                                                               new PointF(40.02f, 75.2f),\r
+                                                                                               new PointF(60.03f, 125.3f),\r
+                                                                                               new PointF(80.04f, 100.4f),\r
+                                                                                               new PointF(100.05f, 50.5f),\r
+                                                                                               new PointF(120.06f, 150.6f),\r
+                                                                                               new PointF(140.07f, 100.7f)};\r
+\r
+                       path = new GraphicsPath();\r
+                       path.AddCurve(points, 0.8f);\r
+\r
+                       Assert.AreEqual (19, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20.01f, 100.1f), \r
+                                                                                                               new PointF(25.346f, 93.45999f), \r
+                                                                                                               new PointF(29.348f, 68.47999f), \r
+                                                                                                               new PointF(40.02f, 75.2f), \r
+                                                                                                               new PointF(50.692f, 81.92f), \r
+                                                                                                               new PointF(49.358f, 118.58f), \r
+                                                                                                               new PointF(60.03f, 125.3f), \r
+                                                                                                               new PointF(70.702f, 132.02f), \r
+                                                                                                               new PointF(69.368f, 120.3467f), \r
+                                                                                                               new PointF(80.04f, 100.4f), \r
+                                                                                                               new PointF(90.712f, 80.45333f), \r
+                                                                                                               new PointF(89.378f, 37.11333f), \r
+                                                                                                               new PointF(100.05f, 50.5f), \r
+                                                                                                               new PointF(110.722f, 63.88667f), \r
+                                                                                                               new PointF(109.388f, 137.2133f), \r
+                                                                                                               new PointF(120.06f, 150.6f), \r
+                                                                                                               new PointF(130.732f, 163.9867f), \r
+                                                                                                               new PointF(134.734f, 114.0067f), \r
+                                                                                                               new PointF(140.07f, 100.7f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddCurve_PointArr_Int_Int_Float()\r
+               {\r
+\r
+                       Point [] points = new Point [] {new Point(20, 100),\r
+                                                                                       new Point(40, 75),\r
+                                                                                       new Point(60, 125),\r
+                                                                                       new Point(80, 100),\r
+                                                                                       new Point(100, 50),\r
+                                                                                       new Point(120, 150),\r
+                                                                                       new Point(140, 100)};\r
+\r
+                       path = new GraphicsPath();\r
+                       path.AddCurve(points, 0, 3, 0.8f);\r
+\r
+                       Assert.AreEqual (10, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20f, 100f), \r
+                                                                                                               new PointF(25.33333f, 93.33333f), \r
+                                                                                                               new PointF(29.33333f, 68.33333f), \r
+                                                                                                               new PointF(40f, 75f), \r
+                                                                                                               new PointF(50.66666f, 81.66666f), \r
+                                                                                                               new PointF(49.33333f, 118.3333f), \r
+                                                                                                               new PointF(60f, 125f), \r
+                                                                                                               new PointF(70.66666f, 131.6667f), \r
+                                                                                                               new PointF(69.33333f, 120f), \r
+                                                                                                               new PointF(80f, 100f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddCurve_PointFArr_Int_Int_Float()\r
+               {\r
+\r
+                       PointF [] points = new PointF [] {      new PointF(20.01f, 100.1f),\r
+                                                                                               new PointF(40.02f, 75.2f),\r
+                                                                                               new PointF(60.03f, 125.3f),\r
+                                                                                               new PointF(80.04f, 100.4f),\r
+                                                                                               new PointF(100.05f, 50.5f),\r
+                                                                                               new PointF(120.06f, 150.6f),\r
+                                                                                               new PointF(140.07f, 100.7f)};\r
+\r
+                       path = new GraphicsPath();\r
+                       path.AddCurve(points, 0, 3, 0.8f);\r
+\r
+                       Assert.AreEqual (10, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20.01f, 100.1f), \r
+                                                                                                               new PointF(25.346f, 93.45999f), \r
+                                                                                                               new PointF(29.348f, 68.47999f), \r
+                                                                                                               new PointF(40.02f, 75.2f), \r
+                                                                                                               new PointF(50.692f, 81.92f), \r
+                                                                                                               new PointF(49.358f, 118.58f), \r
+                                                                                                               new PointF(60.03f, 125.3f), \r
+                                                                                                               new PointF(70.702f, 132.02f), \r
+                                                                                                               new PointF(69.368f, 120.3467f), \r
+                                                                                                               new PointF(80.04f, 100.4f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddEllipse_Rectangle()\r
+               {\r
+                       path = new GraphicsPath();\r
+                       path.AddEllipse (new Rectangle(50, 50, 400, 80));\r
+\r
+                       Assert.AreEqual (13, path.PointCount);\r
+                       \r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(450f, 90f), \r
+                                                                                                               new PointF(450f, 112.0914f), \r
+                                                                                                               new PointF(360.4569f, 130f), \r
+                                                                                                               new PointF(250f, 130f), \r
+                                                                                                               new PointF(139.543f, 130f), \r
+                                                                                                               new PointF(50f, 112.0914f), \r
+                                                                                                               new PointF(50f, 90f), \r
+                                                                                                               new PointF(50f, 67.90861f), \r
+                                                                                                               new PointF(139.543f, 50f), \r
+                                                                                                               new PointF(250f, 50f), \r
+                                                                                                               new PointF(360.4569f, 50f), \r
+                                                                                                               new PointF(450f, 67.90861f), \r
+                                                                                                               new PointF(450f, 90f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddEllipse_RectangleF()\r
+               {\r
+                       path = new GraphicsPath();\r
+                       path.AddEllipse (new RectangleF(50.1f, 50.4f, 400.12f, 80.123f));\r
+\r
+                       Assert.AreEqual (13, path.PointCount);\r
+                       \r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(450.22f, 90.4615f), \r
+                                                                                                               new PointF(450.22f, 112.5869f), \r
+                                                                                                               new PointF(360.6501f, 130.523f), \r
+                                                                                                               new PointF(250.16f, 130.523f), \r
+                                                                                                               new PointF(139.6699f, 130.523f), \r
+                                                                                                               new PointF(50.09999f, 112.5869f), \r
+                                                                                                               new PointF(50.09999f, 90.4615f), \r
+                                                                                                               new PointF(50.09999f, 68.33614f), \r
+                                                                                                               new PointF(139.6699f, 50.4f), \r
+                                                                                                               new PointF(250.16f, 50.4f), \r
+                                                                                                               new PointF(360.6501f, 50.4f), \r
+                                                                                                               new PointF(450.22f, 68.33614f), \r
+                                                                                                               new PointF(450.22f, 90.4615f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddEllipse_Int_Int_Int_Int()\r
+               {\r
+                       path = new GraphicsPath();\r
+                       path.AddEllipse (50, 50, 400, 80);\r
+\r
+                       Assert.AreEqual (13, path.PointCount);\r
+                       \r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(450f, 90f), \r
+                                                                                                               new PointF(450f, 112.0914f), \r
+                                                                                                               new PointF(360.4569f, 130f), \r
+                                                                                                               new PointF(250f, 130f), \r
+                                                                                                               new PointF(139.543f, 130f), \r
+                                                                                                               new PointF(50f, 112.0914f), \r
+                                                                                                               new PointF(50f, 90f), \r
+                                                                                                               new PointF(50f, 67.90861f), \r
+                                                                                                               new PointF(139.543f, 50f), \r
+                                                                                                               new PointF(250f, 50f), \r
+                                                                                                               new PointF(360.4569f, 50f), \r
+                                                                                                               new PointF(450f, 67.90861f), \r
+                                                                                                               new PointF(450f, 90f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddEllipse_Float_Float_Float_Float()\r
+               {\r
+                       path = new GraphicsPath();\r
+                       path.AddEllipse (50.1f, 50.4f, 400.12f, 80.123f);\r
+\r
+                       Assert.AreEqual (13, path.PointCount);\r
+                       \r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(450.22f, 90.4615f), \r
+                                                                                                               new PointF(450.22f, 112.5869f), \r
+                                                                                                               new PointF(360.6501f, 130.523f), \r
+                                                                                                               new PointF(250.16f, 130.523f), \r
+                                                                                                               new PointF(139.6699f, 130.523f), \r
+                                                                                                               new PointF(50.09999f, 112.5869f), \r
+                                                                                                               new PointF(50.09999f, 90.4615f), \r
+                                                                                                               new PointF(50.09999f, 68.33614f), \r
+                                                                                                               new PointF(139.6699f, 50.4f), \r
+                                                                                                               new PointF(250.16f, 50.4f), \r
+                                                                                                               new PointF(360.6501f, 50.4f), \r
+                                                                                                               new PointF(450.22f, 68.33614f), \r
+                                                                                                               new PointF(450.22f, 90.4615f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void AddLine_Point_Point()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       \r
+                       path.AddLine (new Point (20, 20), new Point (10, 120));\r
+                       Assert.AreEqual (2, path.PointCount);\r
+\r
+                       path.AddLine (new Point (40, 320), new Point (310, 45));\r
+                       Assert.AreEqual (4, path.PointCount);\r
+\r
+                       path.AddLine (new Point (300, 300), new Point (48, 62));\r
+                       Assert.AreEqual (6, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20f, 20f), \r
+                                                                                                               new PointF(10f, 120f), \r
+                                                                                                               new PointF(40f, 320f), \r
+                                                                                                               new PointF(310f, 45f), \r
+                                                                                                               new PointF(300f, 300f), \r
+                                                                                                               new PointF(48f, 62f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddLine_PointF_PointF()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       \r
+                       path.AddLine (new PointF (20.02f, 20.123f), new PointF (10.0001f, 120.23f));\r
+                       Assert.AreEqual (2, path.PointCount);\r
+\r
+                       path.AddLine (new PointF (40.00f, 320.234f), new PointF (310.9999f, 45.33333333f));\r
+                       Assert.AreEqual (4, path.PointCount);\r
+\r
+                       path.AddLine (new PointF (300f, 300.97f), new PointF (48.18f, 62.54f));\r
+                       Assert.AreEqual (6, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20.02f, 20.123f), \r
+                                                                                                               new PointF(10.0001f, 120.23f), \r
+                                                                                                               new PointF(40f, 320.234f), \r
+                                                                                                               new PointF(310.9999f, 45.33333f), \r
+                                                                                                               new PointF(300f, 300.97f), \r
+                                                                                                               new PointF(48.18f, 62.54f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddLine_Int_Int_Int_Int()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       \r
+                       path.AddLine (20, 20, 10, 120);\r
+                       Assert.AreEqual (2, path.PointCount);\r
+\r
+                       path.AddLine (40, 320, 310, 45);\r
+                       Assert.AreEqual (4, path.PointCount);\r
+\r
+                       path.AddLine (300, 300, 48, 62);\r
+                       Assert.AreEqual (6, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20f, 20f), \r
+                                                                                                               new PointF(10f, 120f), \r
+                                                                                                               new PointF(40f, 320f), \r
+                                                                                                               new PointF(310f, 45f), \r
+                                                                                                               new PointF(300f, 300f), \r
+                                                                                                               new PointF(48f, 62f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddLine_Float_Float_Float_Float()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       \r
+                       path.AddLine (20.02f, 20.123f, 10.0001f, 120.23f);\r
+                       Assert.AreEqual (2, path.PointCount);\r
+\r
+                       path.AddLine (40.00f, 320.234f, 310.9999f, 45.33333333f);\r
+                       Assert.AreEqual (4, path.PointCount);\r
+\r
+                       path.AddLine (300f, 300.97f, 48.18f, 62.54f);\r
+                       Assert.AreEqual (6, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20.02f, 20.123f), \r
+                                                                                                               new PointF(10.0001f, 120.23f), \r
+                                                                                                               new PointF(40f, 320.234f), \r
+                                                                                                               new PointF(310.9999f, 45.33333f), \r
+                                                                                                               new PointF(300f, 300.97f), \r
+                                                                                                               new PointF(48.18f, 62.54f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddLines_PointArr()\r
+               {\r
+                       Point [] points = new Point [] {new Point(20, 100),\r
+                                                                                       new Point(40, 75),\r
+                                                                                       new Point(60, 125),\r
+                                                                                       new Point(80, 100),\r
+                                                                                       new Point(100, 50),\r
+                                                                                       new Point(120, 150),\r
+                                                                                       new Point(140, 100)};\r
+\r
+                       path = new GraphicsPath();\r
+                       path.AddLines(points);\r
+\r
+                       Assert.AreEqual (7, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20f, 100f), \r
+                                                                                                               new PointF(40f, 75f), \r
+                                                                                                               new PointF(60f, 125f), \r
+                                                                                                               new PointF(80f, 100f), \r
+                                                                                                               new PointF(100f, 50f), \r
+                                                                                                               new PointF(120f, 150f), \r
+                                                                                                               new PointF(140f, 100f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }                                                       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddLines_PointFArr()\r
+               {\r
+                       PointF [] points = new PointF [] {      new PointF(20.01f, 100.1f),\r
+                                                                                               new PointF(40.02f, 75.2f),\r
+                                                                                               new PointF(60.03f, 125.3f),\r
+                                                                                               new PointF(80.04f, 100.4f),\r
+                                                                                               new PointF(100.05f, 50.5f),\r
+                                                                                               new PointF(120.06f, 150.6f),\r
+                                                                                               new PointF(140.07f, 100.7f)};\r
+\r
+                       path = new GraphicsPath();\r
+                       path.AddLines(points);\r
+\r
+                       Assert.AreEqual (7, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20.01f, 100.1f),\r
+                                                                                                               new PointF(40.02f, 75.2f),\r
+                                                                                                               new PointF(60.03f, 125.3f),\r
+                                                                                                               new PointF(80.04f, 100.4f),\r
+                                                                                                               new PointF(100.05f, 50.5f),\r
+                                                                                                               new PointF(120.06f, 150.6f),\r
+                                                                                                               new PointF(140.07f, 100.7f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }                                                               \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddPath_GraphicsPath_Bool_1()\r
+               {\r
+                       Point [] points1 = new Point [] {       new Point (302, 302),\r
+                                                                                               new Point (360, 360),\r
+                                                                                               new Point (0, 460),\r
+                                                                                               new Point (130, 230)};\r
+\r
+                       GraphicsPath path1 = new GraphicsPath ();\r
+                       path1.AddLines (points1);\r
+\r
+                       Point [] points2 = {    new Point (350, 350),\r
+                                                                       new Point (0, 0),\r
+                                                                       new Point (260, 100),\r
+                                                                       new Point (310, 30)};\r
+\r
+                       path = new GraphicsPath ();\r
+                       path.AddLines (points2);\r
+\r
+                       path.AddPath (path1, true);\r
+\r
+                       Assert.AreEqual (8, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(350f, 350f), \r
+                                                                                                               new PointF(0f, 0f), \r
+                                                                                                               new PointF(260f, 100f), \r
+                                                                                                               new PointF(310f, 30f), \r
+                                                                                                               new PointF(302f, 302f), \r
+                                                                                                               new PointF(360f, 360f), \r
+                                                                                                               new PointF(0f, 460f), \r
+                                                                                                               new PointF(130f, 230f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }\r
+       \r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddPath_GraphicsPath_Bool_2()\r
+               {\r
+                       Point [] points1 = new Point [] {       new Point (302, 302),\r
+                                                                                               new Point (360, 360),\r
+                                                                                               new Point (0, 460),\r
+                                                                                               new Point (130, 230)};\r
+\r
+                       GraphicsPath path1 = new GraphicsPath ();\r
+                       path1.AddLines (points1);\r
+\r
+                       Point [] points2 = {    new Point (350, 350),\r
+                                                                       new Point (0, 0),\r
+                                                                       new Point (260, 100),\r
+                                                                       new Point (310, 30)};\r
+\r
+                       path = new GraphicsPath ();\r
+                       path.AddLines (points2);\r
+\r
+                       path.AddPath (path1, false);\r
+\r
+                       Assert.AreEqual (8, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(350f, 350f), \r
+                                                                                                               new PointF(0f, 0f), \r
+                                                                                                               new PointF(260f, 100f), \r
+                                                                                                               new PointF(310f, 30f), \r
+                                                                                                               new PointF(302f, 302f), \r
+                                                                                                               new PointF(360f, 360f), \r
+                                                                                                               new PointF(0f, 460f), \r
+                                                                                                               new PointF(130f, 230f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }\r
+       \r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddPie_Rectangle_Float_Float()\r
+               {\r
+                       path = new GraphicsPath ();\r
+\r
+                       path.AddPie (new Rectangle (20, 30, 350, 370), 10.34f, 240.15f);\r
+\r
+                       Assert.AreEqual (11, path.PointCount);\r
+\r
+                       path.AddPie (new Rectangle (150, 150, 170, 35), -45.001f, 135.87f);\r
+\r
+                       Assert.AreEqual (19, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(195f, 215f), \r
+                                                                                                               new PointF(367.4504f, 246.4639f), \r
+                                                                                                               new PointF(351.0127f, 347.148f), \r
+                                                                                                               new PointF(260.4786f, 414.6818f), \r
+                                                                                                               new PointF(165.2368f, 397.3047f), \r
+                                                                                                               new PointF(69.99509f, 379.9277f), \r
+                                                                                                               new PointF(6.111823f, 284.2202f), \r
+                                                                                                               new PointF(22.54954f, 183.5361f), \r
+                                                                                                               new PointF(33.12234f, 118.7757f), \r
+                                                                                                               new PointF(75.40034f, 64.80574f), \r
+                                                                                                               new PointF(133.6162f, 41.75421f), \r
+                                                                                                               new PointF(235f, 167.5f), \r
+                                                                                                               new PointF(252.1399f, 150.3595f), \r
+                                                                                                               new PointF(298.1198f, 152.3084f), \r
+                                                                                                               new PointF(327.72f, 161.5623f), \r
+                                                                                                               new PointF(318.254f, 171.0288f), \r
+                                                                                                               new PointF(310.1f, 179.1831f), \r
+                                                                                                               new PointF(275.1718f, 185.0259f), \r
+                                                                                                               new PointF(234.7346f, 184.9999f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) (PathPointType.Bezier3 | PathPointType.CloseSubpath),\r
+                                                                                                       (byte) PathPointType.Start,\r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) (PathPointType.Bezier3 | PathPointType.CloseSubpath)}; \r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }                       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddPie_Int_Int_Int_Int_Float_Float()\r
+               {\r
+                       path = new GraphicsPath ();\r
+\r
+                       path.AddPie (20, 30, 350, 370, 10.34f, 240.15f);\r
+\r
+                       Assert.AreEqual (11, path.PointCount);\r
+\r
+                       path.AddPie (150, 150, 170, 35, -45.001f, 135.87f);\r
+\r
+                       Assert.AreEqual (19, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(195f, 215f), \r
+                                                                                                               new PointF(367.4504f, 246.4639f), \r
+                                                                                                               new PointF(351.0127f, 347.148f), \r
+                                                                                                               new PointF(260.4786f, 414.6818f), \r
+                                                                                                               new PointF(165.2368f, 397.3047f), \r
+                                                                                                               new PointF(69.99509f, 379.9277f), \r
+                                                                                                               new PointF(6.111823f, 284.2202f), \r
+                                                                                                               new PointF(22.54954f, 183.5361f), \r
+                                                                                                               new PointF(33.12234f, 118.7757f), \r
+                                                                                                               new PointF(75.40034f, 64.80574f), \r
+                                                                                                               new PointF(133.6162f, 41.75421f), \r
+                                                                                                               new PointF(235f, 167.5f), \r
+                                                                                                               new PointF(252.1399f, 150.3595f), \r
+                                                                                                               new PointF(298.1198f, 152.3084f), \r
+                                                                                                               new PointF(327.72f, 161.5623f), \r
+                                                                                                               new PointF(318.254f, 171.0288f), \r
+                                                                                                               new PointF(310.1f, 179.1831f), \r
+                                                                                                               new PointF(275.1718f, 185.0259f), \r
+                                                                                                               new PointF(234.7346f, 184.9999f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) (PathPointType.Bezier3 | PathPointType.CloseSubpath),\r
+                                                                                                       (byte) PathPointType.Start,\r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) (PathPointType.Bezier3 | PathPointType.CloseSubpath)}; \r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }                       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddPie_Float_Float_Float_Float_Float_Float()\r
+               {\r
+                       path = new GraphicsPath ();\r
+\r
+                       path.AddPie (20f, 30.01f, 350.34f, 370.56f, 10.34f, 240.15f);\r
+\r
+                       Assert.AreEqual (11, path.PointCount);\r
+\r
+                       path.AddPie (150.23f, 150.12f, 170.99f, 35.098f, -45.001f, 135.87f);\r
+\r
+                       Assert.AreEqual (19, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(195.17f, 215.29f), \r
+                                                                                                               new PointF(367.7906f, 246.785f), \r
+                                                                                                               new PointF(351.3456f, 347.623f), \r
+                                                                                                               new PointF(260.7293f, 415.2677f), \r
+                                                                                                               new PointF(165.3936f, 397.8735f), \r
+                                                                                                               new PointF(70.05784f, 380.4793f), \r
+                                                                                                               new PointF(6.104279f, 284.6331f), \r
+                                                                                                               new PointF(22.54932f, 183.7951f), \r
+                                                                                                               new PointF(33.12589f, 118.9412f), \r
+                                                                                                               new PointF(75.43399f, 64.88889f), \r
+                                                                                                               new PointF(133.6974f, 41.79355f), \r
+                                                                                                               new PointF(235.725f, 167.669f), \r
+                                                                                                               new PointF(252.9149f, 150.4784f), \r
+                                                                                                               new PointF(299.1682f, 152.4271f), \r
+                                                                                                               new PointF(328.9677f, 161.7033f), \r
+                                                                                                               new PointF(319.474f, 171.1974f), \r
+                                                                                                               new PointF(311.2924f, 179.3794f), \r
+                                                                                                               new PointF(276.1503f, 185.2439f), \r
+                                                                                                               new PointF(235.4589f, 185.2179f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) (PathPointType.Bezier3 | PathPointType.CloseSubpath),\r
+                                                                                                       (byte) PathPointType.Start,\r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) (PathPointType.Bezier3 | PathPointType.CloseSubpath)}; \r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }                       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddPolygon_PointArr()\r
+               {\r
+                       Point [] points = new Point [] {new Point(20, 100),\r
+                                                                                       new Point(40, 75),\r
+                                                                                       new Point(60, 125),\r
+                                                                                       new Point(80, 100),\r
+                                                                                       new Point(100, 50),\r
+                                                                                       new Point(120, 150),\r
+                                                                                       new Point(140, 100)};\r
+\r
+                       path = new GraphicsPath();\r
+                       path.AddPolygon(points);\r
+\r
+                       Assert.AreEqual (7, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20f, 100f), \r
+                                                                                                               new PointF(40f, 75f), \r
+                                                                                                               new PointF(60f, 125f), \r
+                                                                                                               new PointF(80f, 100f), \r
+                                                                                                               new PointF(100f, 50f), \r
+                                                                                                               new PointF(120f, 150f), \r
+                                                                                                               new PointF(140f, 100f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line | PathPointType.CloseSubpath)}; \r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }                                                       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddPolygon_PointFArr()\r
+               {\r
+                       PointF [] points = new PointF [] {      new PointF(20.01f, 100.1f),\r
+                                                                                               new PointF(40.02f, 75.2f),\r
+                                                                                               new PointF(60.03f, 125.3f),\r
+                                                                                               new PointF(80.04f, 100.4f),\r
+                                                                                               new PointF(100.05f, 50.5f),\r
+                                                                                               new PointF(120.06f, 150.6f),\r
+                                                                                               new PointF(140.07f, 100.7f)};\r
+\r
+                       path = new GraphicsPath();\r
+                       path.AddPolygon(points);\r
+\r
+                       Assert.AreEqual (7, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20.01f, 100.1f),\r
+                                                                                                               new PointF(40.02f, 75.2f),\r
+                                                                                                               new PointF(60.03f, 125.3f),\r
+                                                                                                               new PointF(80.04f, 100.4f),\r
+                                                                                                               new PointF(100.05f, 50.5f),\r
+                                                                                                               new PointF(120.06f, 150.6f),\r
+                                                                                                               new PointF(140.07f, 100.7f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line | PathPointType.CloseSubpath)}; \r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }                                                               \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddRectangle_Rectangle()\r
+               {\r
+                       path = new GraphicsPath();\r
+                       path.AddRectangle (new Rectangle(50, 50, 400, 80));\r
+\r
+                       Assert.AreEqual (4, path.PointCount);\r
+                       \r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(50f, 50f), \r
+                                                                                                               new PointF(450f, 50f), \r
+                                                                                                               new PointF(450f, 130f), \r
+                                                                                                               new PointF(50f, 130f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line,  \r
+                                                                                                       (byte) (PathPointType.Line | PathPointType.CloseSubpath)};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddRectangle_RectangleF()\r
+               {\r
+                       path = new GraphicsPath();\r
+                       path.AddRectangle (new RectangleF(50.1f, 50.4f, 400.12f, 80.123f));\r
+\r
+                       Assert.AreEqual (4, path.PointCount);\r
+                       \r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(50.1f, 50.4f), \r
+                                                                                                               new PointF(450.22f, 50.4f), \r
+                                                                                                               new PointF(450.22f, 130.523f), \r
+                                                                                                               new PointF(50.1f, 130.523f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line | PathPointType.CloseSubpath)};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddRectangles_RectangleArr()\r
+               {\r
+                       path = new GraphicsPath();\r
+                       Rectangle [] rectangles = new Rectangle [] {new Rectangle (50, 50, 400, 80),\r
+                                                                                                               new Rectangle (150, 150, 100, 400),\r
+                                                                                                               new Rectangle (0, 0, 200, 480),\r
+                                                                                                               new Rectangle (450, 450, 40, 80)};\r
+                       path.AddRectangles (rectangles);\r
+\r
+                       Assert.AreEqual (16, path.PointCount);\r
+                       \r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(50f, 50f), \r
+                                                                                                               new PointF(450f, 50f), \r
+                                                                                                               new PointF(450f, 130f), \r
+                                                                                                               new PointF(50f, 130f), \r
+                                                                                                               new PointF(150f, 150f), \r
+                                                                                                               new PointF(250f, 150f), \r
+                                                                                                               new PointF(250f, 550f), \r
+                                                                                                               new PointF(150f, 550f), \r
+                                                                                                               new PointF(0f, 0f), \r
+                                                                                                               new PointF(200f, 0f), \r
+                                                                                                               new PointF(200f, 480f), \r
+                                                                                                               new PointF(0f, 480f), \r
+                                                                                                               new PointF(450f, 450f), \r
+                                                                                                               new PointF(490f, 450f), \r
+                                                                                                               new PointF(490f, 530f), \r
+                                                                                                               new PointF(450f, 530f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line | PathPointType.CloseSubpath), \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line | PathPointType.CloseSubpath), \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line | PathPointType.CloseSubpath),\r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line | PathPointType.CloseSubpath)};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddRectangles_RectangleFArr()\r
+               {\r
+                       path = new GraphicsPath();\r
+                       RectangleF [] rectangles = new RectangleF [] {  new RectangleF (50.10f, 50.11f, 400.1f, 80.15f),\r
+                                                                                                                       new RectangleF (150f, 150.87f, 100.09f, 400.99f),\r
+                                                                                                                       new RectangleF (0.123245f, 0.23f, 200.98f, 480.56f),\r
+                                                                                                                       new RectangleF (450.3333333333f, 450.6666666f, 40.8f, 80.4f)};\r
+                       path.AddRectangles (rectangles);\r
+\r
+                       Assert.AreEqual (16, path.PointCount);\r
+                       \r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(50.1f, 50.11f), \r
+                                                                                                               new PointF(450.2f, 50.11f), \r
+                                                                                                               new PointF(450.2f, 130.26f), \r
+                                                                                                               new PointF(50.1f, 130.26f), \r
+                                                                                                               new PointF(150f, 150.87f), \r
+                                                                                                               new PointF(250.09f, 150.87f), \r
+                                                                                                               new PointF(250.09f, 551.86f), \r
+                                                                                                               new PointF(150f, 551.86f), \r
+                                                                                                               new PointF(0.123245f, 0.23f), \r
+                                                                                                               new PointF(201.1032f, 0.23f), \r
+                                                                                                               new PointF(201.1032f, 480.79f), \r
+                                                                                                               new PointF(0.123245f, 480.79f), \r
+                                                                                                               new PointF(450.3333f, 450.6667f), \r
+                                                                                                               new PointF(491.1333f, 450.6667f), \r
+                                                                                                               new PointF(491.1333f, 531.0667f), \r
+                                                                                                               new PointF(450.3333f, 531.0667f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line | PathPointType.CloseSubpath), \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line | PathPointType.CloseSubpath), \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line | PathPointType.CloseSubpath),\r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line | PathPointType.CloseSubpath)};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddString_String_FontFamily_Int_Float_Point_StringFormat()\r
+               {\r
+                       path = new GraphicsPath();\r
+                       \r
+                       string stringText = "System@Drawing";\r
+                       FontFamily family = new FontFamily ("Arial");\r
+                       int fontStyle = (int)FontStyle.Italic;\r
+                       int emSize = 56;\r
+                       Point origin = new Point (10, 120);\r
+                       StringFormat format = StringFormat.GenericDefault;\r
+                       \r
+                       path.AddString (stringText, family, fontStyle, emSize, origin, format);\r
+\r
+                       Assert.AreEqual (939, path.PointCount);\r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddString_String_FontFamily_Int_Float_PointF_StringFormat()\r
+               {\r
+                       path = new GraphicsPath();\r
+                       \r
+                       string stringText = "System@Drawing";\r
+                       FontFamily family = new FontFamily ("Arial");\r
+                       int fontStyle = (int)FontStyle.Italic;\r
+                       int emSize = 56;\r
+                       PointF origin = new PointF (10.15f, 120.01f);\r
+                       StringFormat format = StringFormat.GenericDefault;\r
+                       \r
+                       path.AddString (stringText, family, fontStyle, emSize, origin, format);\r
+\r
+                       Assert.AreEqual (939, path.PointCount);\r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddString_String_FontFamily_Int_Float_Rectangle_StringFormat()\r
+               {\r
+                       path = new GraphicsPath();\r
+                       \r
+                       string stringText = "System@Drawing";\r
+                       FontFamily family = new FontFamily ("Arial");\r
+                       int fontStyle = (int)FontStyle.Italic;\r
+                       int emSize = 56;\r
+                       Rectangle bound = new Rectangle (10, 120, 335, 50);\r
+                       StringFormat format = StringFormat.GenericDefault;\r
+                       \r
+                       path.AddString (stringText, family, fontStyle, emSize, bound, format);\r
+\r
+                       Assert.AreEqual (657, path.PointCount);\r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void AddString_String_FontFamily_Int_Float_RectangleFF_StringFormat()\r
+               {\r
+                       path = new GraphicsPath();\r
+                       \r
+                       string stringText = "System@Drawing";\r
+                       FontFamily family = new FontFamily ("Arial");\r
+                       int fontStyle = (int)FontStyle.Italic;\r
+                       int emSize = 56;\r
+                       RectangleF bound = new RectangleF (10f, 120.1f, 335.13f, 50.99f);\r
+                       StringFormat format = StringFormat.GenericDefault;\r
+                       \r
+                       path.AddString (stringText, family, fontStyle, emSize, bound, format);\r
+\r
+                       Assert.AreEqual (657, path.PointCount);\r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void ClearMarkers()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddEllipse (0, 0, 100, 200);\r
+                       path.SetMarkers ();\r
+                       path.AddLine (new Point (100, 100), new Point (200, 100));\r
+                       Rectangle rect = new Rectangle (200, 0, 100, 200);\r
+                       path.AddRectangle (rect);\r
+                       path.SetMarkers ();\r
+                       path.AddLine (new Point (250, 200), new Point (250, 300));\r
+                       path.SetMarkers ();\r
+\r
+                       path.ClearMarkers();\r
+\r
+                       GraphicsPathIterator pathIterator = new GraphicsPathIterator(path);\r
+                       pathIterator.Rewind ();\r
+                       int [] pointsNumber = new int [] {21, 0, 0, 0};\r
+                       for (int i=0; i < 4; i ++) {\r
+                               Assert.AreEqual (pointsNumber [i], pathIterator.NextMarker (path));\r
+                       }\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void Clone()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddEllipse (0, 0, 100, 200);\r
+                       path.SetMarkers ();\r
+                       path.AddLine (new Point (100, 100), new Point (200, 100));\r
+                       Rectangle rect = new Rectangle (200, 0, 100, 200);\r
+                       path.AddRectangle (rect);\r
+                       path.SetMarkers ();\r
+                       path.AddLine (new Point (250, 200), new Point (250, 300));\r
+                       path.SetMarkers ();\r
+\r
+                       GraphicsPath cloned = (GraphicsPath) path.Clone ();\r
+\r
+                       Assert.AreEqual (path.PointCount, cloned.PointCount);\r
+\r
+                       for ( int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(path.PathPoints [i], cloned.PathPoints [i]);\r
+                               Assert.AreEqual (path.PathTypes [i], cloned.PathTypes [i]);\r
+                       }\r
+\r
+                       GraphicsPathIterator pathIterator = new GraphicsPathIterator(path);\r
+                       pathIterator.Rewind ();\r
+\r
+                       GraphicsPathIterator clonedIterator = new GraphicsPathIterator(cloned);\r
+                       clonedIterator.Rewind ();\r
+\r
+                       for (int i=0; i < 4; i ++) {\r
+                               Assert.AreEqual (pathIterator.NextMarker (path), clonedIterator.NextMarker (cloned));\r
+                       }\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void CloseAllFigures()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (new Point (100, 100), new Point (400, 100));\r
+                       path.AddLine (new Point (400, 200), new Point (10, 100));\r
+\r
+                       path.StartFigure();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+                       path.StartFigure();\r
+                       path.AddRectangle (new Rectangle (10, 20, 300, 400));\r
+\r
+                       path.StartFigure();\r
+                       path.AddLine (new Point (400, 400), new Point (400, 10));\r
+\r
+                       Assert.AreEqual (14, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(100f, 100f), \r
+                                                                                                               new PointF(400f, 100f), \r
+                                                                                                               new PointF(400f, 200f), \r
+                                                                                                               new PointF(10f, 100f), \r
+                                                                                                               new PointF(10f, 10f), \r
+                                                                                                               new PointF(50f, 250f), \r
+                                                                                                               new PointF(100f, 5f), \r
+                                                                                                               new PointF(200f, 280f), \r
+                                                                                                               new PointF(10f, 20f), \r
+                                                                                                               new PointF(310f, 20f), \r
+                                                                                                               new PointF(310f, 420f), \r
+                                                                                                               new PointF(10f, 420f), \r
+                                                                                                               new PointF(400f, 400f), \r
+                                                                                                               new PointF(400f, 10f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line  |  PathPointType.CloseSubpath), \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       path.CloseAllFigures();\r
+\r
+                       Assert.AreEqual (14, path.PointCount);\r
+                       \r
+                       expectedPoints = new PointF [] {        new PointF(100f, 100f), \r
+                                                                                               new PointF(400f, 100f), \r
+                                                                                               new PointF(400f, 200f), \r
+                                                                                               new PointF(10f, 100f), \r
+                                                                                               new PointF(10f, 10f), \r
+                                                                                               new PointF(50f, 250f), \r
+                                                                                               new PointF(100f, 5f), \r
+                                                                                               new PointF(200f, 280f), \r
+                                                                                               new PointF(10f, 20f), \r
+                                                                                               new PointF(310f, 20f), \r
+                                                                                               new PointF(310f, 420f), \r
+                                                                                               new PointF(10f, 420f), \r
+                                                                                               new PointF(400f, 400f), \r
+                                                                                               new PointF(400f, 10f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) (PathPointType.Line |  PathPointType.CloseSubpath), \r
+                                                                                       (byte) PathPointType.Start, \r
+                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                       (byte) (PathPointType.Bezier3 |  PathPointType.CloseSubpath), \r
+                                                                                       (byte) PathPointType.Start, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) (PathPointType.Line |  PathPointType.CloseSubpath), \r
+                                                                                       (byte) PathPointType.Start, \r
+                                                                                       (byte) (PathPointType.Line |  PathPointType.CloseSubpath)};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void CloseFigure()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (new Point (100, 100), new Point (400, 100));\r
+                       path.AddLine (new Point (400, 200), new Point (10, 100));\r
+\r
+                       path.StartFigure();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+                       path.StartFigure();\r
+                       path.AddRectangle (new Rectangle (10, 20, 300, 400));\r
+\r
+                       path.StartFigure();\r
+                       path.AddLine (new Point (400, 400), new Point (400, 10));\r
+\r
+                       Assert.AreEqual (14, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(100f, 100f), \r
+                                                                                                               new PointF(400f, 100f), \r
+                                                                                                               new PointF(400f, 200f), \r
+                                                                                                               new PointF(10f, 100f), \r
+                                                                                                               new PointF(10f, 10f), \r
+                                                                                                               new PointF(50f, 250f), \r
+                                                                                                               new PointF(100f, 5f), \r
+                                                                                                               new PointF(200f, 280f), \r
+                                                                                                               new PointF(10f, 20f), \r
+                                                                                                               new PointF(310f, 20f), \r
+                                                                                                               new PointF(310f, 420f), \r
+                                                                                                               new PointF(10f, 420f), \r
+                                                                                                               new PointF(400f, 400f), \r
+                                                                                                               new PointF(400f, 10f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line  |  PathPointType.CloseSubpath), \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       path.CloseFigure();\r
+\r
+                       Assert.AreEqual (14, path.PointCount);\r
+                       \r
+                       expectedPoints = new PointF [] {        new PointF(100f, 100f), \r
+                                                                                               new PointF(400f, 100f), \r
+                                                                                               new PointF(400f, 200f), \r
+                                                                                               new PointF(10f, 100f), \r
+                                                                                               new PointF(10f, 10f), \r
+                                                                                               new PointF(50f, 250f), \r
+                                                                                               new PointF(100f, 5f), \r
+                                                                                               new PointF(200f, 280f), \r
+                                                                                               new PointF(10f, 20f), \r
+                                                                                               new PointF(310f, 20f), \r
+                                                                                               new PointF(310f, 420f), \r
+                                                                                               new PointF(10f, 420f), \r
+                                                                                               new PointF(400f, 400f), \r
+                                                                                               new PointF(400f, 10f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) PathPointType.Start, \r
+                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                       (byte) PathPointType.Start, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) (PathPointType.Line |  PathPointType.CloseSubpath), \r
+                                                                                       (byte) PathPointType.Start, \r
+                                                                                       (byte) (PathPointType.Line |  PathPointType.CloseSubpath)};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void Flatten()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddBezier( new Point (10, 10),\r
+                                                       new Point (50, 250),\r
+                                                       new Point (100, 5),\r
+                                                       new Point (200, 280));\r
+\r
+                       path.AddBezier( new Point (0, 210),\r
+                                                       new Point (50, 6),\r
+                                                       new Point (150, 150),\r
+                                                       new Point (250, 10));\r
+\r
+                       Assert.AreEqual (8, path.PointCount);\r
+\r
+                       path.Flatten();\r
+\r
+                       Assert.AreEqual (87, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(10f, 10f), \r
+                                                                                                               new PointF(11.875f, 20.875f), \r
+                                                                                                               new PointF(13.75f, 31.125f), \r
+                                                                                                               new PointF(15.6875f, 40.6875f), \r
+                                                                                                               new PointF(17.625f, 49.5625f), \r
+                                                                                                               new PointF(19.5625f, 57.875f), \r
+                                                                                                               new PointF(21.5625f, 65.5625f), \r
+                                                                                                               new PointF(23.5625f, 72.6875f), \r
+                                                                                                               new PointF(25.5625f, 79.25f), \r
+                                                                                                               new PointF(27.5625f, 85.25f), \r
+                                                                                                               new PointF(29.625f, 90.8125f), \r
+                                                                                                               new PointF(31.6875f, 95.875f), \r
+                                                                                                               new PointF(33.8125f, 100.5f), \r
+                                                                                                               new PointF(35.9375f, 104.625f), \r
+                                                                                                               new PointF(38.125f, 108.375f), \r
+                                                                                                               new PointF(40.3125f, 111.75f), \r
+                                                                                                               new PointF(42.5f, 114.75f), \r
+                                                                                                               new PointF(47f, 119.75f), \r
+                                                                                                               new PointF(51.625f, 123.5625f), \r
+                                                                                                               new PointF(56.4375f, 126.375f), \r
+                                                                                                               new PointF(61.3125f, 128.375f), \r
+                                                                                                               new PointF(66.375f, 129.75f), \r
+                                                                                                               new PointF(71.5625f, 130.6875f), \r
+                                                                                                               new PointF(82.5f, 131.875f), \r
+                                                                                                               new PointF(88.1875f, 132.5625f), \r
+                                                                                                               new PointF(94.125f, 133.5f), \r
+                                                                                                               new PointF(100.1875f, 134.9375f), \r
+                                                                                                               new PointF(106.5f, 137f), \r
+                                                                                                               new PointF(113f, 139.9375f), \r
+                                                                                                               new PointF(119.6875f, 143.875f), \r
+                                                                                                               new PointF(126.625f, 149f), \r
+                                                                                                               new PointF(130.125f, 152.0625f), \r
+                                                                                                               new PointF(133.75f, 155.5625f), \r
+                                                                                                               new PointF(137.4375f, 159.375f), \r
+                                                                                                               new PointF(141.125f, 163.6875f), \r
+                                                                                                               new PointF(144.9375f, 168.375f), \r
+                                                                                                               new PointF(148.75f, 173.5625f), \r
+                                                                                                               new PointF(152.6875f, 179.1875f), \r
+                                                                                                               new PointF(156.625f, 185.375f), \r
+                                                                                                               new PointF(160.6875f, 192.0625f), \r
+                                                                                                               new PointF(164.75f, 199.3125f), \r
+                                                                                                               new PointF(168.9375f, 207.125f), \r
+                                                                                                               new PointF(173.1875f, 215.5625f), \r
+                                                                                                               new PointF(177.4375f, 224.5625f), \r
+                                                                                                               new PointF(181.8125f, 234.3125f), \r
+                                                                                                               new PointF(186.25f, 244.625f), \r
+                                                                                                               new PointF(190.75f, 255.6875f), \r
+                                                                                                               new PointF(195.375f, 267.5f), \r
+                                                                                                               new PointF(200f, 280f), \r
+                                                                                                               new PointF(0f, 210f), \r
+                                                                                                               new PointF(2.375f, 200.6875f), \r
+                                                                                                               new PointF(4.8125f, 191.875f), \r
+                                                                                                               new PointF(7.375f, 183.5625f), \r
+                                                                                                               new PointF(9.9375f, 175.6875f), \r
+                                                                                                               new PointF(12.625f, 168.25f), \r
+                                                                                                               new PointF(15.3125f, 161.25f), \r
+                                                                                                               new PointF(18.125f, 154.75f), \r
+                                                                                                               new PointF(21f, 148.5625f), \r
+                                                                                                               new PointF(23.9375f, 142.8125f), \r
+                                                                                                               new PointF(26.9375f, 137.4375f), \r
+                                                                                                               new PointF(33.0625f, 127.8125f), \r
+                                                                                                               new PointF(39.4375f, 119.4375f), \r
+                                                                                                               new PointF(46.125f, 112.375f), \r
+                                                                                                               new PointF(52.9375f, 106.375f), \r
+                                                                                                               new PointF(60f, 101.4375f), \r
+                                                                                                               new PointF(67.25f, 97.3125f), \r
+                                                                                                               new PointF(74.6875f, 94f), \r
+                                                                                                               new PointF(82.3125f, 91.3125f), \r
+                                                                                                               new PointF(90.125f, 89.125f), \r
+                                                                                                               new PointF(98.125f, 87.4375f), \r
+                                                                                                               new PointF(106.25f, 86f), \r
+                                                                                                               new PointF(122.9375f, 83.625f), \r
+                                                                                                               new PointF(140.125f, 81f), \r
+                                                                                                               new PointF(148.9375f, 79.375f), \r
+                                                                                                               new PointF(157.75f, 77.3125f), \r
+                                                                                                               new PointF(166.75f, 74.8125f), \r
+                                                                                                               new PointF(175.8125f, 71.625f), \r
+                                                                                                               new PointF(184.875f, 67.75f), \r
+                                                                                                               new PointF(194.0625f, 62.9375f), \r
+                                                                                                               new PointF(203.3125f, 57.25f), \r
+                                                                                                               new PointF(212.625f, 50.4375f), \r
+                                                                                                               new PointF(221.9375f, 42.375f), \r
+                                                                                                               new PointF(231.25f, 33.0625f), \r
+                                                                                                               new PointF(235.9375f, 27.875f), \r
+                                                                                                               new PointF(240.625f, 22.3125f), \r
+                                                                                                               new PointF(245.3125f, 16.375f), \r
+                                                                                                               new PointF(250f, 10f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }                                               \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void Flatten_Matrix()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddBezier( new Point (10, 10),\r
+                                                       new Point (50, 250),\r
+                                                       new Point (100, 5),\r
+                                                       new Point (200, 280));\r
+\r
+                       path.AddBezier( new Point (0, 210),\r
+                                                       new Point (50, 6),\r
+                                                       new Point (150, 150),\r
+                                                       new Point (250, 10));\r
+\r
+                       Assert.AreEqual (8, path.PointCount);\r
+\r
+                       Matrix matrix = new Matrix();\r
+                       matrix.Scale(2f,3f);\r
+                       path.Flatten(matrix);\r
+\r
+                       Assert.AreEqual (141, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20f, 30f), \r
+                                                                                                               new PointF(21.875f, 46.625f), \r
+                                                                                                               new PointF(23.75f, 62.6875f), \r
+                                                                                                               new PointF(25.6875f, 78.25f), \r
+                                                                                                               new PointF(27.5625f, 93.3125f), \r
+                                                                                                               new PointF(29.5f, 107.875f), \r
+                                                                                                               new PointF(31.375f, 122f), \r
+                                                                                                               new PointF(33.3125f, 135.5625f), \r
+                                                                                                               new PointF(35.25f, 148.6875f), \r
+                                                                                                               new PointF(37.1875f, 161.3125f), \r
+                                                                                                               new PointF(39.125f, 173.5625f), \r
+                                                                                                               new PointF(41.125f, 185.3125f), \r
+                                                                                                               new PointF(43.0625f, 196.625f), \r
+                                                                                                               new PointF(45.0625f, 207.5f), \r
+                                                                                                               new PointF(47.0625f, 218f), \r
+                                                                                                               new PointF(49.0625f, 228f), \r
+                                                                                                               new PointF(51.125f, 237.6875f), \r
+                                                                                                               new PointF(53.125f, 246.9375f), \r
+                                                                                                               new PointF(55.1875f, 255.8125f), \r
+                                                                                                               new PointF(57.1875f, 264.3125f), \r
+                                                                                                               new PointF(59.25f, 272.4375f), \r
+                                                                                                               new PointF(63.4375f, 287.625f), \r
+                                                                                                               new PointF(67.625f, 301.375f), \r
+                                                                                                               new PointF(71.875f, 313.875f), \r
+                                                                                                               new PointF(76.1875f, 325.1875f), \r
+                                                                                                               new PointF(80.5625f, 335.25f), \r
+                                                                                                               new PointF(85f, 344.25f), \r
+                                                                                                               new PointF(89.5f, 352.25f), \r
+                                                                                                               new PointF(94f, 359.25f), \r
+                                                                                                               new PointF(98.625f, 365.375f), \r
+                                                                                                               new PointF(103.3125f, 370.6875f), \r
+                                                                                                               new PointF(108.0625f, 375.25f), \r
+                                                                                                               new PointF(112.8125f, 379.125f), \r
+                                                                                                               new PointF(117.6875f, 382.375f), \r
+                                                                                                               new PointF(122.6875f, 385.0625f), \r
+                                                                                                               new PointF(127.6875f, 387.3125f), \r
+                                                                                                               new PointF(132.75f, 389.125f), \r
+                                                                                                               new PointF(143.1875f, 391.875f), \r
+                                                                                                               new PointF(153.9375f, 393.75f), \r
+                                                                                                               new PointF(165f, 395.4375f), \r
+                                                                                                               new PointF(176.4375f, 397.375f), \r
+                                                                                                               new PointF(188.25f, 400.1875f), \r
+                                                                                                               new PointF(194.25f, 402.125f), \r
+                                                                                                               new PointF(200.375f, 404.4375f), \r
+                                                                                                               new PointF(206.625f, 407.25f), \r
+                                                                                                               new PointF(213f, 410.625f), \r
+                                                                                                               new PointF(219.4375f, 414.5625f), \r
+                                                                                                               new PointF(225.9375f, 419.3125f), \r
+                                                                                                               new PointF(232.625f, 424.75f), \r
+                                                                                                               new PointF(239.375f, 431.0625f), \r
+                                                                                                               new PointF(246.25f, 438.25f), \r
+                                                                                                               new PointF(253.1875f, 446.375f), \r
+                                                                                                               new PointF(260.3125f, 455.625f), \r
+                                                                                                               new PointF(267.5f, 465.9375f), \r
+                                                                                                               new PointF(274.8125f, 477.4375f), \r
+                                                                                                               new PointF(282.25f, 490.1875f), \r
+                                                                                                               new PointF(289.8125f, 504.25f), \r
+                                                                                                               new PointF(297.5f, 519.6875f), \r
+                                                                                                               new PointF(301.4375f, 527.9375f), \r
+                                                                                                               new PointF(305.3125f, 536.625f), \r
+                                                                                                               new PointF(309.3125f, 545.625f), \r
+                                                                                                               new PointF(313.25f, 555.0625f), \r
+                                                                                                               new PointF(317.3125f, 564.8125f), \r
+                                                                                                               new PointF(321.3125f, 575.0625f), \r
+                                                                                                               new PointF(325.4375f, 585.6875f), \r
+                                                                                                               new PointF(329.5625f, 596.75f), \r
+                                                                                                               new PointF(333.6875f, 608.25f), \r
+                                                                                                               new PointF(337.875f, 620.1875f), \r
+                                                                                                               new PointF(342.0625f, 632.5625f), \r
+                                                                                                               new PointF(346.3125f, 645.375f), \r
+                                                                                                               new PointF(350.625f, 658.6875f), \r
+                                                                                                               new PointF(354.9375f, 672.4375f), \r
+                                                                                                               new PointF(359.25f, 686.75f), \r
+                                                                                                               new PointF(363.625f, 701.5f), \r
+                                                                                                               new PointF(368.0625f, 716.75f), \r
+                                                                                                               new PointF(372.5f, 732.5f), \r
+                                                                                                               new PointF(377f, 748.8125f), \r
+                                                                                                               new PointF(381.5625f, 765.625f), \r
+                                                                                                               new PointF(386.125f, 782.9375f), \r
+                                                                                                               new PointF(390.6875f, 800.875f), \r
+                                                                                                               new PointF(395.3125f, 819.3125f), \r
+                                                                                                               new PointF(400f, 838.3125f), \r
+                                                                                                               new PointF(0f, 630f), \r
+                                                                                                               new PointF(2.375f, 615.875f), \r
+                                                                                                               new PointF(4.75f, 602.0625f), \r
+                                                                                                               new PointF(9.6875f, 575.625f), \r
+                                                                                                               new PointF(14.6875f, 550.625f), \r
+                                                                                                               new PointF(19.875f, 527f), \r
+                                                                                                               new PointF(25.25f, 504.75f), \r
+                                                                                                               new PointF(30.6875f, 483.8125f), \r
+                                                                                                               new PointF(36.25f, 464.1875f), \r
+                                                                                                               new PointF(42f, 445.75f), \r
+                                                                                                               new PointF(47.8125f, 428.5f), \r
+                                                                                                               new PointF(53.8125f, 412.375f), \r
+                                                                                                               new PointF(59.9375f, 397.3125f), \r
+                                                                                                               new PointF(66.125f, 383.375f), \r
+                                                                                                               new PointF(72.4375f, 370.375f), \r
+                                                                                                               new PointF(78.9375f, 358.375f), \r
+                                                                                                               new PointF(85.5f, 347.3125f), \r
+                                                                                                               new PointF(92.1875f, 337.125f), \r
+                                                                                                               new PointF(98.9375f, 327.75f), \r
+                                                                                                               new PointF(105.875f, 319.1875f), \r
+                                                                                                               new PointF(112.875f, 311.375f), \r
+                                                                                                               new PointF(119.9375f, 304.25f), \r
+                                                                                                               new PointF(127.1875f, 297.8125f), \r
+                                                                                                               new PointF(134.4375f, 291.9375f), \r
+                                                                                                               new PointF(141.875f, 286.6875f), \r
+                                                                                                               new PointF(149.3125f, 281.9375f), \r
+                                                                                                               new PointF(156.9375f, 277.6875f), \r
+                                                                                                               new PointF(164.5625f, 273.875f), \r
+                                                                                                               new PointF(172.375f, 270.5f), \r
+                                                                                                               new PointF(180.1875f, 267.4375f), \r
+                                                                                                               new PointF(196.125f, 262.25f), \r
+                                                                                                               new PointF(212.3125f, 258f), \r
+                                                                                                               new PointF(228.875f, 254.3125f), \r
+                                                                                                               new PointF(245.625f, 250.8125f), \r
+                                                                                                               new PointF(262.6875f, 247.125f), \r
+                                                                                                               new PointF(279.9375f, 243.0625f), \r
+                                                                                                               new PointF(297.4375f, 238.125f), \r
+                                                                                                               new PointF(306.25f, 235.25f), \r
+                                                                                                               new PointF(315.125f, 232f), \r
+                                                                                                               new PointF(324f, 228.375f), \r
+                                                                                                               new PointF(333f, 224.375f), \r
+                                                                                                               new PointF(342f, 219.875f), \r
+                                                                                                               new PointF(351f, 214.875f), \r
+                                                                                                               new PointF(360.0625f, 209.3125f), \r
+                                                                                                               new PointF(369.1875f, 203.1875f), \r
+                                                                                                               new PointF(378.3125f, 196.375f), \r
+                                                                                                               new PointF(387.4375f, 188.875f), \r
+                                                                                                               new PointF(396.625f, 180.6875f), \r
+                                                                                                               new PointF(405.8125f, 171.6875f), \r
+                                                                                                               new PointF(415.0625f, 161.9375f), \r
+                                                                                                               new PointF(424.3125f, 151.25f), \r
+                                                                                                               new PointF(433.5625f, 139.6875f), \r
+                                                                                                               new PointF(442.8125f, 127.25f), \r
+                                                                                                               new PointF(452.125f, 113.75f), \r
+                                                                                                               new PointF(461.4375f, 99.25f), \r
+                                                                                                               new PointF(470.75f, 83.625f), \r
+                                                                                                               new PointF(480.0625f, 66.9375f), \r
+                                                                                                               new PointF(489.375f, 49.0625f), \r
+                                                                                                               new PointF(498.6875f, 30f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }                                               \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void Flatten_Matrix_Float()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddBezier( new Point (10, 10),\r
+                                                       new Point (50, 250),\r
+                                                       new Point (100, 5),\r
+                                                       new Point (200, 280));\r
+\r
+                       Assert.AreEqual (4, path.PointCount);\r
+\r
+                       Matrix matrix = new Matrix();\r
+                       matrix.Scale(2f,3f);\r
+                       path.Flatten(matrix, 0.1f);\r
+\r
+                       Assert.AreEqual (78, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(20f, 30f), \r
+                                                                                                               new PointF(21.875f, 46.6f), \r
+                                                                                                               new PointF(23.775f, 62.7f), \r
+                                                                                                               new PointF(25.65f, 78.27499f), \r
+                                                                                                               new PointF(27.55f, 93.325f), \r
+                                                                                                               new PointF(29.475f, 107.9f), \r
+                                                                                                               new PointF(31.4f, 121.975f), \r
+                                                                                                               new PointF(33.325f, 135.575f), \r
+                                                                                                               new PointF(35.25f, 148.675f), \r
+                                                                                                               new PointF(37.2f, 161.35f), \r
+                                                                                                               new PointF(39.15f, 173.55f), \r
+                                                                                                               new PointF(41.125f, 185.3f), \r
+                                                                                                               new PointF(43.1f, 196.625f), \r
+                                                                                                               new PointF(45.075f, 207.5f), \r
+                                                                                                               new PointF(47.075f, 217.975f), \r
+                                                                                                               new PointF(49.075f, 228.025f), \r
+                                                                                                               new PointF(51.1f, 237.675f), \r
+                                                                                                               new PointF(55.15f, 255.825f), \r
+                                                                                                               new PointF(59.275f, 272.425f), \r
+                                                                                                               new PointF(63.425f, 287.6f), \r
+                                                                                                               new PointF(67.625f, 301.425f), \r
+                                                                                                               new PointF(71.89999f, 313.925f), \r
+                                                                                                               new PointF(76.2f, 325.2f), \r
+                                                                                                               new PointF(80.575f, 335.3f), \r
+                                                                                                               new PointF(85f, 344.3f), \r
+                                                                                                               new PointF(89.475f, 352.275f), \r
+                                                                                                               new PointF(94.02499f, 359.3f), \r
+                                                                                                               new PointF(98.625f, 365.425f), \r
+                                                                                                               new PointF(103.3f, 370.75f), \r
+                                                                                                               new PointF(108.025f, 375.3f), \r
+                                                                                                               new PointF(112.85f, 379.175f), \r
+                                                                                                               new PointF(117.7f, 382.45f), \r
+                                                                                                               new PointF(122.65f, 385.175f), \r
+                                                                                                               new PointF(127.675f, 387.4f), \r
+                                                                                                               new PointF(132.775f, 389.25f), \r
+                                                                                                               new PointF(143.175f, 392f), \r
+                                                                                                               new PointF(153.925f, 393.925f), \r
+                                                                                                               new PointF(165f, 395.625f), \r
+                                                                                                               new PointF(176.425f, 397.625f), \r
+                                                                                                               new PointF(188.225f, 400.5f), \r
+                                                                                                               new PointF(194.25f, 402.425f), \r
+                                                                                                               new PointF(200.4f, 404.775f), \r
+                                                                                                               new PointF(206.625f, 407.6f), \r
+                                                                                                               new PointF(212.975f, 411f), \r
+                                                                                                               new PointF(219.4f, 415.025f), \r
+                                                                                                               new PointF(225.95f, 419.75f), \r
+                                                                                                               new PointF(232.6f, 425.25f), \r
+                                                                                                               new PointF(239.35f, 431.575f), \r
+                                                                                                               new PointF(246.225f, 438.825f), \r
+                                                                                                               new PointF(253.2f, 447.025f), \r
+                                                                                                               new PointF(260.3f, 456.275f), \r
+                                                                                                               new PointF(267.5f, 466.65f), \r
+                                                                                                               new PointF(274.825f, 478.175f), \r
+                                                                                                               new PointF(282.275f, 490.975f), \r
+                                                                                                               new PointF(289.825f, 505.1f), \r
+                                                                                                               new PointF(297.525f, 520.6f), \r
+                                                                                                               new PointF(305.325f, 537.55f), \r
+                                                                                                               new PointF(313.275f, 556.05f), \r
+                                                                                                               new PointF(317.275f, 565.875f), \r
+                                                                                                               new PointF(321.325f, 576.125f), \r
+                                                                                                               new PointF(325.425f, 586.775f), \r
+                                                                                                               new PointF(329.525f, 597.85f), \r
+                                                                                                               new PointF(333.675f, 609.375f), \r
+                                                                                                               new PointF(337.85f, 621.35f), \r
+                                                                                                               new PointF(342.075f, 633.75f), \r
+                                                                                                               new PointF(346.325f, 646.625f), \r
+                                                                                                               new PointF(350.6f, 659.95f), \r
+                                                                                                               new PointF(354.925f, 673.775f), \r
+                                                                                                               new PointF(359.275f, 688.075f), \r
+                                                                                                               new PointF(363.65f, 702.85f), \r
+                                                                                                               new PointF(368.075f, 718.15f), \r
+                                                                                                               new PointF(372.525f, 733.95f), \r
+                                                                                                               new PointF(377.025f, 750.275f), \r
+                                                                                                               new PointF(381.55f, 767.125f), \r
+                                                                                                               new PointF(386.1f, 784.525f), \r
+                                                                                                               new PointF(390.7f, 802.45f), \r
+                                                                                                               new PointF(395.325f, 820.95f), \r
+                                                                                                               new PointF(400f, 840f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }                                               \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void GetBounds()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (new Point (100, 100), new Point (400, 100));\r
+                       path.AddLine (new Point (400, 200), new Point (10, 100));\r
+\r
+                       path.StartFigure ();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+                       path.StartFigure ();\r
+                       path.AddRectangle (new Rectangle (10, 20, 300, 400));\r
+\r
+                       path.StartFigure ();\r
+                       path.AddLine (new Point (400, 400), new Point (400, 10));\r
+\r
+                       RectangleF actual = path.GetBounds ();\r
+                       RectangleF expected = new RectangleF (10f, 5f, 390f, 415f);\r
+\r
+                       DrawingTest.AssertAlmostEqual(expected.X, actual.X);\r
+                       DrawingTest.AssertAlmostEqual(expected.Y, actual.Y);\r
+                       DrawingTest.AssertAlmostEqual(expected.Width, actual.Width);\r
+                       DrawingTest.AssertAlmostEqual(expected.Height, actual.Height);\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void GetBounds_Matrix()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (new Point (100, 100), new Point (400, 100));\r
+                       path.AddLine (new Point (400, 200), new Point (10, 100));\r
+\r
+                       path.StartFigure ();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+                       path.StartFigure ();\r
+                       path.AddRectangle (new Rectangle (10, 20, 300, 400));\r
+\r
+                       path.StartFigure ();\r
+                       path.AddLine (new Point (400, 400), new Point (400, 10));\r
+\r
+                       Matrix matrix = new Matrix ();\r
+                       matrix.Scale (1.2f,1.3f);\r
+                       matrix.Shear (1.5f, 1.9f);\r
+\r
+                       RectangleF actual = path.GetBounds (matrix);\r
+                       RectangleF expected = new RectangleF (21f, 31.2f, 1215f, 1502.8f);\r
+\r
+                       DrawingTest.AssertAlmostEqual(expected.X, actual.X);\r
+                       DrawingTest.AssertAlmostEqual(expected.Y, actual.Y);\r
+                       DrawingTest.AssertAlmostEqual(expected.Width, actual.Width);\r
+                       DrawingTest.AssertAlmostEqual(expected.Height, actual.Height);\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void GetBounds_Matrix_Pen()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (new Point (100, 100), new Point (400, 100));\r
+                       path.AddLine (new Point (400, 200), new Point (10, 100));\r
+\r
+                       path.StartFigure ();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+                       path.StartFigure ();\r
+                       path.AddRectangle (new Rectangle (10, 20, 300, 400));\r
+\r
+                       path.StartFigure ();\r
+                       path.AddLine (new Point (400, 400), new Point (400, 10));\r
+\r
+                       Matrix matrix = new Matrix ();\r
+                       matrix.Scale (1.2f,1.3f);\r
+                       matrix.Shear (1.5f, 1.9f);\r
+\r
+                       Pen p = new Pen (Color.AliceBlue, 45);\r
+\r
+                       RectangleF actual = path.GetBounds (matrix, p);\r
+                       RectangleF expected = new RectangleF (21f, 31.2f, 2758.363f, 3046.163f);\r
+\r
+                       DrawingTest.AssertAlmostEqual(expected.X, actual.X);\r
+                       DrawingTest.AssertAlmostEqual(expected.Y, actual.Y);\r
+                       DrawingTest.AssertAlmostEqual(expected.Width, actual.Width);\r
+                       DrawingTest.AssertAlmostEqual(expected.Height, actual.Height);\r
+\r
+\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (new Point (100, 100), new Point (400, 100));\r
+                       path.AddLine (new Point (400, 200), new Point (10, 100));\r
+\r
+                       path.StartFigure ();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+                       path.StartFigure ();\r
+                       path.AddRectangle (new Rectangle (10, 20, 300, 400));\r
+\r
+                       path.StartFigure ();\r
+                       path.AddLine (new Point (400, 400), new Point (400, 10));\r
+\r
+                       p = new Pen (Color.AliceBlue, 45);\r
+                       p.DashCap = DashCap.Triangle;\r
+                       p.DashStyle = DashStyle.Dash;\r
+\r
+                       actual = path.GetBounds (matrix, p);\r
+                       expected = new RectangleF (21f, 31.2f, 2758.363f, 3046.163f);\r
+\r
+                       DrawingTest.AssertAlmostEqual(expected.X, actual.X);\r
+                       DrawingTest.AssertAlmostEqual(expected.Y, actual.Y);\r
+                       DrawingTest.AssertAlmostEqual(expected.Width, actual.Width);\r
+                       DrawingTest.AssertAlmostEqual(expected.Height, actual.Height);\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void GetLastPoint()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (new Point (100, 100), new Point (400, 100));\r
+                       path.AddLine (new Point (400, 200), new Point (10, 100));\r
+\r
+                       PointF expected = new PointF (10f, 100f);\r
+                       PointF actual = path.GetLastPoint ();\r
+\r
+                       DrawingTest.AssertAlmostEqual(expected, actual);\r
+\r
+                       path.StartFigure ();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+                       path.StartFigure ();\r
+                       path.AddRectangle (new Rectangle (10, 20, 300, 400));\r
+\r
+                       expected = new PointF (10f, 420f);\r
+                       actual = path.GetLastPoint ();\r
+\r
+                       DrawingTest.AssertAlmostEqual(expected, actual);\r
+\r
+                       path.StartFigure ();\r
+                       path.AddLine (new Point (400, 400), new Point (400, 10));\r
+\r
+                       expected = new PointF (400f, 10f);\r
+                       actual = path.GetLastPoint ();\r
+\r
+                       DrawingTest.AssertAlmostEqual(expected, actual);\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void IsOutlineVisible_Float_Float_Pen()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddRectangle (new RectangleF (10f, 10f, 300f, 300f));\r
+                       \r
+                       path.StartFigure();\r
+                       path.AddRectangle (new RectangleF (150f, 10f, 50f, 400f));\r
+\r
+                       Pen pen = new Pen (Color.Red, 5);\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (0f, 0f, pen));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (40f, 40f, pen));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (9f, 9f, pen));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (400f, 400f, pen));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (312f, 312f, pen));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (313f, 313f, pen));\r
+\r
+                       pen = new Pen (Color.Red, 20);\r
+                       pen.DashStyle = DashStyle.Dash;\r
+                       pen.DashCap = DashCap.Round;\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (new PointF (0f, 0f), pen));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new PointF (40f, 40f), pen));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (new PointF (311f, 290f), pen));\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void IsOutlineVisible_PointF_Pen()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddRectangle (new RectangleF (10f, 10f, 300f, 300f));\r
+                       \r
+                       path.StartFigure();\r
+                       path.AddRectangle (new RectangleF (150f, 10f, 50f, 400f));\r
+\r
+                       Pen pen = new Pen (Color.Red, 5);\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new PointF (0f, 0f), pen));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new PointF (40f, 40f), pen));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (new PointF (9f, 9f), pen));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new PointF (400f, 400f), pen));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (new PointF (312f, 312f), pen));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new PointF (313f, 313f), pen));\r
+\r
+                       pen = new Pen (Color.Red, 20);\r
+                       pen.DashStyle = DashStyle.Dash;\r
+                       pen.DashCap = DashCap.Round;\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (new PointF (0f, 0f), pen));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new PointF (40f, 40f), pen));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (new PointF (311f, 290f), pen));\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void IsOutlineVisible_Float_Float_Pen_Graphics()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddRectangle (new RectangleF (10f, 10f, 300f, 300f));\r
+                       \r
+                       path.StartFigure();\r
+                       path.AddRectangle (new RectangleF (150f, 10f, 50f, 400f));\r
+\r
+                       Pen pen = new Pen (Color.Red, 5);\r
+                       Graphics gr = Graphics.FromImage (new Bitmap (512, 512));\r
+                       gr.Clip = new Region (new Rectangle ( 5, 5, 500, 50));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (0f, 0f, pen, gr));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (40f, 40f, pen, gr));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (9f, 9f, pen, gr));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (400f, 400f, pen, gr));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (312f, 312f, pen, gr));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (313f, 313f, pen, gr));\r
+\r
+                       pen = new Pen (Color.Red, 20);\r
+                       pen.DashStyle = DashStyle.Dash;\r
+                       pen.DashCap = DashCap.Round;\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (0f, 0f, pen, gr));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (40f, 40f, pen, gr));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (311f, 290f, pen, gr));\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void IsOutlineVisible_PointF_Pen_Graphics()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddRectangle (new RectangleF (10f, 10f, 300f, 300f));\r
+                       \r
+                       path.StartFigure();\r
+                       path.AddRectangle (new RectangleF (150f, 10f, 50f, 400f));\r
+\r
+                       Pen pen = new Pen (Color.Red, 5);\r
+                       Graphics gr = Graphics.FromImage (new Bitmap (512, 512));\r
+                       gr.Clip = new Region (new Rectangle ( 5, 5, 500, 50));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new PointF (0f, 0f), pen, gr));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new PointF (40f, 40f), pen, gr));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (new PointF (9f, 9f), pen, gr));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new PointF (400f, 400f), pen, gr));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (new PointF (312f, 312f), pen, gr));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new PointF (313f, 313f), pen, gr));\r
+\r
+                       pen = new Pen (Color.Red, 20);\r
+                       pen.DashStyle = DashStyle.Dash;\r
+                       pen.DashCap = DashCap.Round;\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (new PointF (0f, 0f), pen, gr));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new PointF (40f, 40f), pen, gr));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (new PointF (311f, 290f), pen, gr));\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void IsOutlineVisible_Int_Int_Pen()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddRectangle (new RectangleF (10f, 10f, 300f, 300f));\r
+                       \r
+                       path.StartFigure();\r
+                       path.AddRectangle (new RectangleF (150f, 10f, 50f, 400f));\r
+\r
+                       Pen pen = new Pen (Color.Red, 5);\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (0, 0, pen));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (40, 40, pen));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (9, 9, pen));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (400, 400, pen));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (312, 312, pen));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (313, 313, pen));\r
+\r
+                       pen = new Pen (Color.Red, 20);\r
+                       pen.DashStyle = DashStyle.Dash;\r
+                       pen.DashCap = DashCap.Round;\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (0, 0, pen));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (40, 40, pen));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (311, 290, pen));\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void IsOutlineVisible_Point_Pen()\r
+               {                               \r
+                       path = new GraphicsPath ();\r
+                       path.AddRectangle (new RectangleF (10f, 10f, 300f, 300f));\r
+                       \r
+                       path.StartFigure();\r
+                       path.AddRectangle (new RectangleF (150f, 10f, 50f, 400f));\r
+\r
+                       Pen pen = new Pen (Color.Red, 5);\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new Point (0, 0), pen));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new Point (40, 40), pen));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (new Point (9, 9), pen));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new Point (400, 400), pen));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (new Point (312, 312), pen));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new Point (313, 313), pen));\r
+\r
+                       pen = new Pen (Color.Red, 20);\r
+                       pen.DashStyle = DashStyle.Dash;\r
+                       pen.DashCap = DashCap.Round;\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (new Point (0, 0), pen));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new Point (40, 40), pen));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (new Point (311, 290), pen));\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void IsOutlineVisible_Int_Int_Pen_Graphics()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddRectangle (new RectangleF (10f, 10f, 300f, 300f));\r
+                       \r
+                       path.StartFigure();\r
+                       path.AddRectangle (new RectangleF (150f, 10f, 50f, 400f));\r
+\r
+                       Pen pen = new Pen (Color.Red, 5);\r
+                       Graphics gr = Graphics.FromImage (new Bitmap (512, 512));\r
+                       gr.Clip = new Region (new Rectangle ( 5, 5, 500, 50));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (0, 0, pen, gr));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (40, 40, pen, gr));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (9, 9, pen, gr));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (400, 400, pen, gr));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (312, 312, pen, gr));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (313, 313, pen, gr));\r
+\r
+                       pen = new Pen (Color.Red, 20);\r
+                       pen.DashStyle = DashStyle.Dash;\r
+                       pen.DashCap = DashCap.Round;\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (0, 0, pen, gr));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (40, 40, pen, gr));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (311, 290, pen, gr));\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void IsOutlineVisible_Point_Pen_Graphics()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddRectangle (new RectangleF (10f, 10f, 300f, 300f));\r
+                       \r
+                       path.StartFigure();\r
+                       path.AddRectangle (new RectangleF (150f, 10f, 50f, 400f));\r
+\r
+                       Pen pen = new Pen (Color.Red, 5);\r
+                       Graphics gr = Graphics.FromImage (new Bitmap (512, 512));\r
+                       gr.Clip = new Region (new Rectangle ( 5, 5, 500, 50));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new Point (0, 0), pen, gr));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new Point (40, 40), pen, gr));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (new Point (9, 9), pen, gr));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new Point (400, 400), pen, gr));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (new Point (312, 312), pen, gr));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new Point (313, 313), pen, gr));\r
+\r
+                       pen = new Pen (Color.Red, 20);\r
+                       pen.DashStyle = DashStyle.Dash;\r
+                       pen.DashCap = DashCap.Round;\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (new Point (0, 0), pen, gr));\r
+\r
+                       Assert.IsFalse (path.IsOutlineVisible (new Point (40, 40), pen, gr));\r
+\r
+                       Assert.IsTrue (path.IsOutlineVisible (new Point (311, 290), pen, gr));\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void IsVisible_Float_Float()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (10, 10, 400, 10);\r
+                       path.AddLine (400, 10, 10, 400);\r
+                       path.AddLine (10, 400, 400, 400);\r
+                       path.CloseFigure();\r
+\r
+                       Assert.IsFalse (path.IsVisible (9f, 9f));\r
+                       \r
+                       Assert.IsTrue (path.IsVisible (10f, 10f));\r
+\r
+                       Assert.IsFalse (path.IsVisible (400f, 400f));\r
+\r
+                       Assert.IsTrue (path.IsVisible (397f, 399f));\r
+\r
+                       Assert.IsFalse (path.IsVisible (399f, 397f));\r
+\r
+                       Assert.IsTrue (path.IsVisible (190f, 190f));\r
+\r
+                       Assert.IsFalse (path.IsVisible (50f, 190f));\r
+\r
+                       Assert.IsTrue (path.IsVisible (190f, 50f));\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void IsVisible_PointF()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (10, 10, 400, 10);\r
+                       path.AddLine (400, 10, 10, 400);\r
+                       path.AddLine (10, 400, 400, 400);\r
+                       path.CloseFigure();\r
+\r
+                       Assert.IsFalse (path.IsVisible (new PointF (9f, 9f)));\r
+                       \r
+                       Assert.IsTrue (path.IsVisible (new PointF (10f, 10f)));\r
+\r
+                       Assert.IsFalse (path.IsVisible (new PointF (400f, 400f)));\r
+\r
+                       Assert.IsTrue (path.IsVisible (new PointF (397f, 399f)));\r
+\r
+                       Assert.IsFalse (path.IsVisible (new PointF (399f, 397f)));\r
+\r
+                       Assert.IsTrue (path.IsVisible (new PointF (190f, 190f)));\r
+\r
+                       Assert.IsFalse (path.IsVisible (new PointF (50f, 190f)));\r
+\r
+                       Assert.IsTrue (path.IsVisible (new PointF (190f, 50f)));\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void IsVisible_Float_Float_Graphics()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (10, 10, 400, 10);\r
+                       path.AddLine (400, 10, 10, 400);\r
+                       path.AddLine (10, 400, 400, 400);\r
+                       path.CloseFigure();\r
+\r
+                       Graphics gr = Graphics.FromImage (new Bitmap (500, 100));\r
+                       gr.Clip = new Region (new Rectangle(0, 0, 50, 50));\r
+\r
+                       Assert.IsFalse (path.IsVisible (9f, 9f, gr));\r
+                       \r
+                       Assert.IsTrue (path.IsVisible (10f, 10f, gr));\r
+\r
+                       Assert.IsFalse (path.IsVisible (400f, 400f, gr));\r
+\r
+                       Assert.IsTrue (path.IsVisible (397f, 399f, gr));\r
+\r
+                       Assert.IsFalse (path.IsVisible (399f, 397f, gr));\r
+\r
+                       Assert.IsTrue (path.IsVisible (190f, 190f, gr));\r
+\r
+                       Assert.IsFalse (path.IsVisible (50f, 190f, gr));\r
+\r
+                       Assert.IsTrue (path.IsVisible (190f, 50f, gr));\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void IsVisible_PointF_Graphics()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (10, 10, 400, 10);\r
+                       path.AddLine (400, 10, 10, 400);\r
+                       path.AddLine (10, 400, 400, 400);\r
+                       path.CloseFigure();\r
+\r
+                       Graphics gr = Graphics.FromImage (new Bitmap (500, 100));\r
+                       gr.Clip = new Region (new Rectangle(0, 0, 50, 50));\r
+\r
+                       Assert.IsFalse (path.IsVisible (new PointF (9f, 9f), gr));\r
+                       \r
+                       Assert.IsTrue (path.IsVisible (new PointF (10f, 10f), gr));\r
+\r
+                       Assert.IsFalse (path.IsVisible (new PointF (400f, 400f), gr));\r
+\r
+                       Assert.IsTrue (path.IsVisible (new PointF (397f, 399f), gr));\r
+\r
+                       Assert.IsFalse (path.IsVisible (new PointF (399f, 397f), gr));\r
+\r
+                       Assert.IsTrue (path.IsVisible (new PointF (190f, 190f), gr));\r
+\r
+                       Assert.IsFalse (path.IsVisible (new PointF (50f, 190f), gr));\r
+\r
+                       Assert.IsTrue (path.IsVisible (new PointF (190f, 50f), gr));\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void IsVisible_Int_Int()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (10, 10, 400, 10);\r
+                       path.AddLine (400, 10, 10, 400);\r
+                       path.AddLine (10, 400, 400, 400);\r
+                       path.CloseFigure();\r
+\r
+                       Assert.IsFalse (path.IsVisible (9, 9));\r
+                       \r
+                       Assert.IsTrue (path.IsVisible (10, 10));\r
+\r
+                       Assert.IsFalse (path.IsVisible (400, 400));\r
+\r
+                       Assert.IsTrue (path.IsVisible (397, 399));\r
+\r
+                       Assert.IsFalse (path.IsVisible (399, 397));\r
+\r
+                       Assert.IsTrue (path.IsVisible (190, 190));\r
+\r
+                       Assert.IsFalse (path.IsVisible (50, 190));\r
+\r
+                       Assert.IsTrue (path.IsVisible (190, 50));\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void IsVisible_Point()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (10, 10, 400, 10);\r
+                       path.AddLine (400, 10, 10, 400);\r
+                       path.AddLine (10, 400, 400, 400);\r
+                       path.CloseFigure();\r
+\r
+                       Assert.IsFalse (path.IsVisible (new Point (9, 9)));\r
+                       \r
+                       Assert.IsTrue (path.IsVisible (new Point (10, 10)));\r
+\r
+                       Assert.IsFalse (path.IsVisible (new Point (400, 400)));\r
+\r
+                       Assert.IsTrue (path.IsVisible (new Point (397, 399)));\r
+\r
+                       Assert.IsFalse (path.IsVisible (new Point (399, 397)));\r
+\r
+                       Assert.IsTrue (path.IsVisible (new Point (190, 190)));\r
+\r
+                       Assert.IsFalse (path.IsVisible (new Point (50, 190)));\r
+\r
+                       Assert.IsTrue (path.IsVisible (new Point (190, 50)));\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void IsVisible_Int_Int_Graphics()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (10, 10, 400, 10);\r
+                       path.AddLine (400, 10, 10, 400);\r
+                       path.AddLine (10, 400, 400, 400);\r
+                       path.CloseFigure();\r
+\r
+                       Graphics gr = Graphics.FromImage (new Bitmap (500, 100));\r
+                       gr.Clip = new Region (new Rectangle(0, 0, 50, 50));\r
+\r
+                       Assert.IsFalse (path.IsVisible (9, 9, gr));\r
+                       \r
+                       Assert.IsTrue (path.IsVisible (10, 10, gr));\r
+\r
+                       Assert.IsFalse (path.IsVisible (400, 400, gr));\r
+\r
+                       Assert.IsTrue (path.IsVisible (397, 399, gr));\r
+\r
+                       Assert.IsFalse (path.IsVisible (399, 397, gr));\r
+\r
+                       Assert.IsTrue (path.IsVisible (190, 190, gr));\r
+\r
+                       Assert.IsFalse (path.IsVisible (50, 190, gr));\r
+\r
+                       Assert.IsTrue (path.IsVisible (190, 50));\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void IsVisible_Point_Graphics()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (10, 10, 400, 10);\r
+                       path.AddLine (400, 10, 10, 400);\r
+                       path.AddLine (10, 400, 400, 400);\r
+                       path.CloseFigure();\r
+\r
+                       Graphics gr = Graphics.FromImage (new Bitmap (500, 100));\r
+                       gr.Clip = new Region (new Rectangle(0, 0, 50, 50));\r
+\r
+                       Assert.IsFalse (path.IsVisible (new Point (9, 9), gr));\r
+                       \r
+                       Assert.IsTrue (path.IsVisible (new Point (10, 10), gr));\r
+\r
+                       Assert.IsFalse (path.IsVisible (new Point (400, 400), gr));\r
+\r
+                       Assert.IsTrue (path.IsVisible (new Point (397, 399), gr));\r
+\r
+                       Assert.IsFalse (path.IsVisible (new Point (399, 397), gr));\r
+\r
+                       Assert.IsTrue (path.IsVisible (new Point (190, 190), gr));\r
+\r
+                       Assert.IsFalse (path.IsVisible (new Point (50, 190), gr));\r
+\r
+                       Assert.IsTrue (path.IsVisible (new Point (190, 50), gr));\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void Reset()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (new Point (100, 100), new Point (400, 100));\r
+                       path.AddLine (new Point (400, 200), new Point (10, 100));\r
+\r
+                       path.StartFigure ();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+                       path.StartFigure ();\r
+                       path.AddRectangle (new Rectangle (10, 20, 300, 400));\r
+\r
+                       path.StartFigure ();\r
+                       path.AddLine (new Point (400, 400), new Point (400, 10));\r
+\r
+                       path.Reset ();\r
+\r
+                       Assert.AreEqual (0, path.PointCount);\r
+                       Assert.AreEqual (FillMode.Alternate, path.FillMode);\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               \r
+               [Test]\r
+               public void Reverse()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (new Point (100, 100), new Point (400, 100));\r
+                       path.AddLine (new Point (400, 200), new Point (10, 100));\r
+\r
+                       path.StartFigure ();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+                       path.StartFigure ();\r
+                       path.AddRectangle (new Rectangle (10, 20, 300, 400));\r
+\r
+                       path.StartFigure ();\r
+                       path.AddLine (new Point (400, 400), new Point (400, 10));\r
+\r
+                       path.Reverse ();\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(400f, 10f), \r
+                                                                                                               new PointF(400f, 400f), \r
+                                                                                                               new PointF(10f, 420f), \r
+                                                                                                               new PointF(310f, 420f), \r
+                                                                                                               new PointF(310f, 20f), \r
+                                                                                                               new PointF(10f, 20f), \r
+                                                                                                               new PointF(200f, 280f), \r
+                                                                                                               new PointF(100f, 5f), \r
+                                                                                                               new PointF(50f, 250f), \r
+                                                                                                               new PointF(10f, 10f), \r
+                                                                                                               new PointF(10f, 100f), \r
+                                                                                                               new PointF(400f, 200f), \r
+                                                                                                               new PointF(400f, 100f), \r
+                                                                                                               new PointF(100f, 100f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line | PathPointType.CloseSubpath), \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void SetMarkers()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddEllipse (0, 0, 100, 200);\r
+                       path.SetMarkers ();\r
+                       path.AddLine (new Point (100, 100), new Point (200, 100));\r
+                       Rectangle rect = new Rectangle (200, 0, 100, 200);\r
+                       path.AddRectangle (rect);\r
+                       path.SetMarkers ();\r
+                       path.AddLine (new Point (250, 200), new Point (250, 300));\r
+                       path.SetMarkers ();\r
+\r
+                       GraphicsPathIterator pathIterator = new GraphicsPathIterator(path);\r
+                       pathIterator.Rewind ();\r
+                       int [] pointsNumber = new int[] {13, 6, 2, 0};\r
+                       for (int i=0; i < 4; i ++) {\r
+                               Assert.AreEqual (pathIterator.NextMarker (path), pointsNumber[i]);\r
+                       }\r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void StartFigure()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (new Point (100, 100), new Point (400, 100));\r
+                       path.AddLine (new Point (400, 200), new Point (10, 100));\r
+\r
+                       path.StartFigure();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+                       path.StartFigure();\r
+                       path.AddRectangle (new Rectangle (10, 20, 300, 400));\r
+\r
+                       path.StartFigure();\r
+                       path.AddLine (new Point (400, 400), new Point (400, 10));\r
+\r
+                       path.StartFigure();\r
+\r
+                       Assert.AreEqual (14, path.PointCount);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(100f, 100f), \r
+                                                                                                               new PointF(400f, 100f), \r
+                                                                                                               new PointF(400f, 200f), \r
+                                                                                                               new PointF(10f, 100f), \r
+                                                                                                               new PointF(10f, 10f), \r
+                                                                                                               new PointF(50f, 250f), \r
+                                                                                                               new PointF(100f, 5f), \r
+                                                                                                               new PointF(200f, 280f), \r
+                                                                                                               new PointF(10f, 20f), \r
+                                                                                                               new PointF(310f, 20f), \r
+                                                                                                               new PointF(310f, 420f), \r
+                                                                                                               new PointF(10f, 420f), \r
+                                                                                                               new PointF(400f, 400f), \r
+                                                                                                               new PointF(400f, 10f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line  |  PathPointType.CloseSubpath), \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void Transform_Matrix()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (new Point (100, 100), new Point (200, 100));\r
+                       path.AddLine (new Point (200, 200), new Point (10, 100));\r
+\r
+                       path.StartFigure();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+                       path.StartFigure();\r
+                       path.AddRectangle (new Rectangle (10, 20, 200, 200));\r
+\r
+                       path.StartFigure();\r
+                       path.AddLine (new Point (200, 200), new Point (200, 10));\r
+\r
+                       Matrix matrix = new Matrix ();\r
+                       matrix.Scale (1.2f, 1.4f);\r
+                       matrix.Shear (0.9f, -1.15f);\r
+                       matrix.Rotate (5);\r
+\r
+                       path.Transform (matrix);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(226.0865f, 5.313778f), \r
+                                                                                                               new PointF(355.0427f, -142.8718f), \r
+                                                                                                               new PointF(452.173f, 10.62756f), \r
+                                                                                                               new PointF(110.0259f, 138.6808f), \r
+                                                                                                               new PointF(22.60865f, 0.5313778f), \r
+                                                                                                               new PointF(307.3039f, 309.6555f), \r
+                                                                                                               new PointF(133.8127f, -140.5106f), \r
+                                                                                                               new PointF(529.8773f, 133.427f), \r
+                                                                                                               new PointF(32.32168f, 15.88131f), \r
+                                                                                                               new PointF(290.234f, -280.4898f), \r
+                                                                                                               new PointF(484.4947f, 26.50887f), \r
+                                                                                                               new PointF(226.5823f, 322.8799f), \r
+                                                                                                               new PointF(452.173f, 10.62756f), \r
+                                                                                                               new PointF(267.6254f, -281.0212f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Bezier3, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line  |  PathPointType.CloseSubpath), \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void Warp_PointFArr_RectangleF()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (new Point (100, 100), new Point (200, 100));\r
+                       path.AddLine (new Point (200, 200), new Point (10, 100));\r
+\r
+                       path.StartFigure();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+                       path.StartFigure();\r
+                       path.AddRectangle (new Rectangle (10, 20, 200, 200));\r
+\r
+                       path.StartFigure();\r
+                       path.AddLine (new Point (200, 200), new Point (200, 10));\r
+\r
+                       RectangleF rectangle = new RectangleF (0f, 0f, 40f, 40f);\r
+                       PointF [] warp = new PointF [] {        new PointF (0f, 0f), \r
+                                                                                               new PointF (50f, 50f),\r
+                                                                                               new PointF (20f, 40f)};\r
+\r
+                       path.Warp (warp, rectangle);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(175f, 225f), \r
+                                                                                                               new PointF(300f, 350f), \r
+                                                                                                               new PointF(350f, 450f), \r
+                                                                                                               new PointF(62.5f, 112.5f), \r
+                                                                                                               new PointF(17.5f, 22.5f), \r
+                                                                                                               new PointF(71.54785f, 111.1621f), \r
+                                                                                                               new PointF(110.5078f, 167.8906f), \r
+                                                                                                               new PointF(140.8545f, 205.0488f), \r
+                                                                                                               new PointF(169.0625f, 235f), \r
+                                                                                                               new PointF(201.6064f, 270.1074f), \r
+                                                                                                               new PointF(244.9609f, 322.7344f), \r
+                                                                                                               new PointF(305.6006f, 405.2441f), \r
+                                                                                                               new PointF(390f, 530f), \r
+                                                                                                               new PointF(22.5f, 32.5f), \r
+                                                                                                               new PointF(272.5f, 282.5f), \r
+                                                                                                               new PointF(372.5f, 482.5f), \r
+                                                                                                               new PointF(122.5f, 232.5f), \r
+                                                                                                               new PointF(350f, 450f), \r
+                                                                                                               new PointF(255f, 260f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line,\r
+                                                                                                       (byte) (PathPointType.Line  |  PathPointType.CloseSubpath), \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void Warp_PointFArr_RectangleF_Matrix()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (new Point (100, 100), new Point (200, 100));\r
+                       path.AddLine (new Point (200, 200), new Point (10, 100));\r
+\r
+                       path.StartFigure();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+                       path.StartFigure();\r
+                       path.AddRectangle (new Rectangle (10, 20, 200, 200));\r
+\r
+                       path.StartFigure();\r
+                       path.AddLine (new Point (200, 200), new Point (200, 10));\r
+\r
+                       RectangleF rectangle = new RectangleF (0f, 0f, 40f, 40f);\r
+                       PointF [] warp = new PointF [] {        new PointF (0f, 0f), \r
+                                                                                               new PointF (50f, 50f),\r
+                                                                                               new PointF (20f, 40f)};\r
+\r
+                       Matrix matrix = new Matrix();\r
+                       matrix.Scale(1.5f, 0.5f);\r
+\r
+                       path.Warp (warp, rectangle, matrix);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(262.5f, 112.5f), \r
+                                                                                                               new PointF(450f, 175f), \r
+                                                                                                               new PointF(525f, 225f), \r
+                                                                                                               new PointF(93.75f, 56.25f), \r
+                                                                                                               new PointF(26.25f, 11.25f), \r
+                                                                                                               new PointF(107.3218f, 55.58105f), \r
+                                                                                                               new PointF(165.7617f, 83.94531f), \r
+                                                                                                               new PointF(211.2817f, 102.5244f), \r
+                                                                                                               new PointF(253.5938f, 117.5f), \r
+                                                                                                               new PointF(302.4097f, 135.0537f), \r
+                                                                                                               new PointF(367.4414f, 161.3672f), \r
+                                                                                                               new PointF(458.4009f, 202.6221f), \r
+                                                                                                               new PointF(585f, 265f), \r
+                                                                                                               new PointF(33.75f, 16.25f), \r
+                                                                                                               new PointF(408.75f, 141.25f), \r
+                                                                                                               new PointF(558.75f, 241.25f), \r
+                                                                                                               new PointF(183.75f, 116.25f), \r
+                                                                                                               new PointF(525f, 225f), \r
+                                                                                                               new PointF(382.5f, 130f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line,\r
+                                                                                                       (byte) (PathPointType.Line  |  PathPointType.CloseSubpath), \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void Warp_PointFArr_RectangleF_Matrix_WarpMode()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (new Point (100, 100), new Point (200, 100));\r
+                       path.AddLine (new Point (200, 200), new Point (10, 100));\r
+\r
+                       path.StartFigure();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+                       path.StartFigure();\r
+                       path.AddRectangle (new Rectangle (10, 20, 200, 200));\r
+\r
+                       path.StartFigure();\r
+                       path.AddLine (new Point (200, 200), new Point (200, 10));\r
+\r
+                       RectangleF rectangle = new RectangleF (0f, 0f, 40f, 40f);\r
+                       PointF [] warp = new PointF [] {        new PointF (0f, 0f), \r
+                                                                                               new PointF (50f, 50f),\r
+                                                                                               new PointF (20f, 40f)};\r
+\r
+                       Matrix matrix = new Matrix();\r
+                       matrix.Scale(1.5f, 0.5f);\r
+\r
+                       path.Warp (warp, rectangle, matrix, WarpMode.Bilinear);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(262.5f, 112.5f), \r
+                                                                                                               new PointF(449.9999f, 175f), \r
+                                                                                                               new PointF(524.9999f, 225f), \r
+                                                                                                               new PointF(412.9687f, 180f), \r
+                                                                                                               new PointF(292.4999f, 129.375f), \r
+                                                                                                               new PointF(163.5937f, 73.12499f), \r
+                                                                                                               new PointF(26.25f, 11.25f), \r
+                                                                                                               new PointF(153.75f, 83.74999f), \r
+                                                                                                               new PointF(153.75f, 83.74999f), \r
+                                                                                                               new PointF(192.6927f, 98.78391f), \r
+                                                                                                               new PointF(226.0163f, 109.1132f), \r
+                                                                                                               new PointF(253.6658f, 116.3978f), \r
+                                                                                                               new PointF(266.8857f, 118.041f), \r
+                                                                                                               new PointF(254.0196f, 109.4254f), \r
+                                                                                                               new PointF(213.4754f, 89.22914f), \r
+                                                                                                               new PointF(408.7499f, 141.25f), \r
+                                                                                                               new PointF(558.7499f, 241.25f), \r
+                                                                                                               new PointF(456.5624f, 205.9375f), \r
+                                                                                                               new PointF(469.4531f, 208.6719f), \r
+                                                                                                               new PointF(524.9999f, 225f), \r
+                                                                                                               new PointF(382.5f, 130f), \r
+                                                                                                               new PointF(5.064195E-08f, 8.370257E-08f), \r
+                                                                                                               new PointF(3.344191E-06f, 2.124933E-06f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (new Point (100, 100), new Point (200, 100));\r
+                       path.AddLine (new Point (200, 200), new Point (10, 100));\r
+\r
+                       path.StartFigure();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+                       path.StartFigure();\r
+                       path.AddRectangle (new Rectangle (10, 20, 200, 200));\r
+\r
+                       path.StartFigure();\r
+                       path.AddLine (new Point (200, 200), new Point (200, 10));\r
+\r
+                       path.Warp (warp, rectangle, matrix, WarpMode.Perspective);\r
+\r
+                       expectedPoints = new PointF [] {new PointF(262.5f, 112.5f), \r
+                                                                                       new PointF(450f, 175f), \r
+                                                                                       new PointF(525f, 225f), \r
+                                                                                       new PointF(93.75f, 56.25f), \r
+                                                                                       new PointF(26.25f, 11.25f), \r
+                                                                                       new PointF(107.3218f, 55.58105f), \r
+                                                                                       new PointF(165.7617f, 83.94531f), \r
+                                                                                       new PointF(211.2817f, 102.5244f), \r
+                                                                                       new PointF(253.5938f, 117.5f), \r
+                                                                                       new PointF(302.4097f, 135.0537f), \r
+                                                                                       new PointF(367.4414f, 161.3672f), \r
+                                                                                       new PointF(458.4009f, 202.6221f), \r
+                                                                                       new PointF(585f, 265f), \r
+                                                                                       new PointF(33.75f, 16.25f), \r
+                                                                                       new PointF(408.75f, 141.25f), \r
+                                                                                       new PointF(558.75f, 241.25f), \r
+                                                                                       new PointF(183.75f, 116.25f), \r
+                                                                                       new PointF(525f, 225f), \r
+                                                                                       new PointF(382.5f, 130f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) PathPointType.Start, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) PathPointType.Start, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) PathPointType.Line, \r
+                                                                                       (byte) (PathPointType.Line  |  PathPointType.CloseSubpath), \r
+                                                                                       (byte) PathPointType.Start, \r
+                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void Warp_PointFArr_RectangleF_Matrix_WarpMode_Float()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddLine (new Point (100, 100), new Point (200, 100));\r
+                       path.AddLine (new Point (200, 200), new Point (10, 100));\r
+\r
+                       path.StartFigure();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+                       path.StartFigure();\r
+                       path.AddRectangle (new Rectangle (10, 20, 200, 200));\r
+\r
+                       path.StartFigure();\r
+                       path.AddLine (new Point (200, 200), new Point (200, 10));\r
+\r
+                       RectangleF rectangle = new RectangleF (0f, 0f, 40f, 40f);\r
+                       PointF [] warp = new PointF [] {        new PointF (0f, 0f), \r
+                                                                                               new PointF (50f, 50f),\r
+                                                                                               new PointF (20f, 40f)};\r
+\r
+                       Matrix matrix = new Matrix();\r
+                       matrix.Scale(1.5f, 0.5f);\r
+\r
+                       path.Warp (warp, rectangle, matrix, WarpMode.Perspective, 0.2f);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(262.5f, 112.5f), \r
+                                                                                                               new PointF(450f, 175f), \r
+                                                                                                               new PointF(525f, 225f), \r
+                                                                                                               new PointF(93.75f, 56.25f), \r
+                                                                                                               new PointF(26.25f, 11.25f), \r
+                                                                                                               new PointF(107.3218f, 55.58105f), \r
+                                                                                                               new PointF(165.7617f, 83.94531f), \r
+                                                                                                               new PointF(211.2817f, 102.5244f), \r
+                                                                                                               new PointF(253.5938f, 117.5f), \r
+                                                                                                               new PointF(302.4097f, 135.0537f), \r
+                                                                                                               new PointF(367.4414f, 161.3672f), \r
+                                                                                                               new PointF(458.4009f, 202.6221f), \r
+                                                                                                               new PointF(585f, 265f), \r
+                                                                                                               new PointF(33.75f, 16.25f), \r
+                                                                                                               new PointF(408.75f, 141.25f), \r
+                                                                                                               new PointF(558.75f, 241.25f), \r
+                                                                                                               new PointF(183.75f, 116.25f), \r
+                                                                                                               new PointF(525f, 225f), \r
+                                                                                                               new PointF(382.5f, 130f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line,\r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line  |  PathPointType.CloseSubpath), \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }       \r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+               [Test]\r
+               public void Widen_Pen()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+                       path.StartFigure();\r
+                       path.AddRectangle (new Rectangle (10, 20, 200, 200));\r
+\r
+                       Pen pen = new Pen (Color.Red, 15);\r
+\r
+                       path.Widen (pen);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {       new PointF(17.37995f, 8.663473f), \r
+                                                                                                               new PointF(21.21328f, 29.83014f), \r
+                                                                                                               new PointF(21.17457f, 29.63168f), \r
+                                                                                                               new PointF(25.00791f, 47.96501f), \r
+                                                                                                               new PointF(24.96026f, 47.75257f), \r
+                                                                                                               new PointF(28.79359f, 63.75257f), \r
+                                                                                                               new PointF(28.69803f, 63.39326f), \r
+                                                                                                               new PointF(32.69803f, 77.05992f), \r
+                                                                                                               new PointF(32.56306f, 76.64414f), \r
+                                                                                                               new PointF(36.72973f, 88.31081f), \r
+                                                                                                               new PointF(36.5541f, 87.86461f), \r
+                                                                                                               new PointF(40.72076f, 97.53127f), \r
+                                                                                                               new PointF(40.39609f, 96.86954f), \r
+                                                                                                               new PointF(44.72942f, 104.7029f), \r
+                                                                                                               new PointF(44.40704f, 104.1731f), \r
+                                                                                                               new PointF(48.74038f, 110.6731f), \r
+                                                                                                               new PointF(48.0747f, 109.8161f), \r
+                                                                                                               new PointF(52.5747f, 114.8161f), \r
+                                                                                                               new PointF(51.63366f, 113.9359f), \r
+                                                                                                               new PointF(56.30032f, 117.6026f), \r
+                                                                                                               new PointF(55.45956f, 117.0298f), \r
+                                                                                                               new PointF(60.2929f, 119.8631f), \r
+                                                                                                               new PointF(59.36763f, 119.4032f), \r
+                                                                                                               new PointF(64.20096f, 121.4032f), \r
+                                                                                                               new PointF(62.98528f, 121.0175f), \r
+                                                                                                               new PointF(73.31861f, 123.3508f), \r
+                                                                                                               new PointF(72.46971f, 123.2098f), \r
+                                                                                                               new PointF(83.43214f, 124.3903f), \r
+                                                                                                               new PointF(95.72781f, 126.1469f), \r
+                                                                                                               new PointF(109.1111f, 129.9448f), \r
+                                                                                                               new PointF(116.4476f, 133.3309f), \r
+                                                                                                               new PointF(123.7762f, 137.5449f), \r
+                                                                                                               new PointF(131.4605f, 143.2166f), \r
+                                                                                                               new PointF(138.9887f, 150.2071f), \r
+                                                                                                               new PointF(146.8953f, 158.8165f), \r
+                                                                                                               new PointF(154.9268f, 169.1177f), \r
+                                                                                                               new PointF(163.0379f, 181.3707f), \r
+                                                                                                               new PointF(171.4102f, 195.7232f), \r
+                                                                                                               new PointF(179.9099f, 212.2126f), \r
+                                                                                                               new PointF(188.6968f, 231.3073f), \r
+                                                                                                               new PointF(197.8003f, 252.886f), \r
+                                                                                                               new PointF(207.0185f, 277.356f), \r
+                                                                                                               new PointF(192.9815f, 282.644f), \r
+                                                                                                               new PointF(183.8148f, 258.3106f), \r
+                                                                                                               new PointF(183.9231f, 258.5819f), \r
+                                                                                                               new PointF(174.9231f, 237.2486f), \r
+                                                                                                               new PointF(175.0201f, 237.4686f), \r
+                                                                                                               new PointF(166.3534f, 218.6353f), \r
+                                                                                                               new PointF(166.5002f, 218.9363f), \r
+                                                                                                               new PointF(158.1669f, 202.7696f), \r
+                                                                                                               new PointF(158.355f, 203.1124f), \r
+                                                                                                               new PointF(150.1883f, 189.1124f), \r
+                                                                                                               new PointF(150.4128f, 189.4732f), \r
+                                                                                                               new PointF(142.5794f, 177.6399f), \r
+                                                                                                               new PointF(142.9186f, 178.1115f), \r
+                                                                                                               new PointF(135.2519f, 168.2781f), \r
+                                                                                                               new PointF(135.6427f, 168.7397f), \r
+                                                                                                               new PointF(128.1427f, 160.573f), \r
+                                                                                                               new PointF(128.5633f, 160.9959f), \r
+                                                                                                               new PointF(121.5633f, 154.4959f), \r
+                                                                                                               new PointF(122.2128f, 155.0343f), \r
+                                                                                                               new PointF(115.2128f, 149.8676f), \r
+                                                                                                               new PointF(115.9281f, 150.3351f), \r
+                                                                                                               new PointF(109.2615f, 146.5018f), \r
+                                                                                                               new PointF(109.8571f, 146.8097f), \r
+                                                                                                               new PointF(103.3571f, 143.8097f), \r
+                                                                                                               new PointF(104.4525f, 144.2151f), \r
+                                                                                                               new PointF(92.11913f, 140.7151f), \r
+                                                                                                               new PointF(93.106f, 140.9246f), \r
+                                                                                                               new PointF(81.43933f, 139.2579f), \r
+                                                                                                               new PointF(81.69695f, 139.2902f), \r
+                                                                                                               new PointF(70.4351f, 138.0774f), \r
+                                                                                                               new PointF(59.05708f, 135.5082f), \r
+                                                                                                               new PointF(53.15385f, 133.0655f), \r
+                                                                                                               new PointF(47.43391f, 129.7124f), \r
+                                                                                                               new PointF(41.85787f, 125.3312f), \r
+                                                                                                               new PointF(36.56138f, 119.4462f), \r
+                                                                                                               new PointF(31.75414f, 112.2354f), \r
+                                                                                                               new PointF(27.09196f, 103.8076f), \r
+                                                                                                               new PointF(22.68428f, 93.58176f), \r
+                                                                                                               new PointF(18.36339f, 81.48326f), \r
+                                                                                                               new PointF(14.24973f, 67.42826f), \r
+                                                                                                               new PointF(10.3477f, 51.14154f), \r
+                                                                                                               new PointF(6.471401f, 32.6027f), \r
+                                                                                                               new PointF(2.620048f, 11.33653f), \r
+                                                                                                               new PointF(2.5f, 12.5f), \r
+                                                                                                               new PointF(217.5f, 12.5f), \r
+                                                                                                               new PointF(217.5f, 227.5f), \r
+                                                                                                               new PointF(2.5f, 227.5f), \r
+                                                                                                               new PointF(17.5f, 220f), \r
+                                                                                                               new PointF(10f, 212.5f), \r
+                                                                                                               new PointF(210f, 212.5f), \r
+                                                                                                               new PointF(202.5f, 220f), \r
+                                                                                                               new PointF(202.5f, 20f), \r
+                                                                                                               new PointF(210f, 27.5f), \r
+                                                                                                               new PointF(10f, 27.5f), \r
+                                                                                                               new PointF(17.5f, 20f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line,\r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line  |  PathPointType.CloseSubpath),  \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line  |  PathPointType.CloseSubpath),  \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line  |  PathPointType.CloseSubpath)};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }\r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void Widen_Pen_Matrix()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+                       path.StartFigure();\r
+                       path.AddRectangle (new Rectangle (10, 20, 200, 200));\r
+\r
+                       Pen pen = new Pen (Color.Red, 15);\r
+\r
+                       Matrix matrix = new Matrix();\r
+                       matrix.Scale(1.5f, 0.5f);\r
+\r
+                       path.Widen (pen, matrix);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(26.07226f, 4.336054f), \r
+                                                                                                               new PointF(31.73893f, 14.83605f), \r
+                                                                                                               new PointF(31.68019f, 14.73517f), \r
+                                                                                                               new PointF(37.51352f, 24.0685f), \r
+                                                                                                               new PointF(37.43172f, 23.94766f), \r
+                                                                                                               new PointF(43.26505f, 31.94765f), \r
+                                                                                                               new PointF(43.13037f, 31.77996f), \r
+                                                                                                               new PointF(49.13037f, 38.61329f), \r
+                                                                                                               new PointF(48.90903f, 38.3879f), \r
+                                                                                                               new PointF(55.07569f, 44.05457f), \r
+                                                                                                               new PointF(54.85265f, 43.86571f), \r
+                                                                                                               new PointF(61.01931f, 48.69905f), \r
+                                                                                                               new PointF(60.29364f, 48.22634f), \r
+                                                                                                               new PointF(73.29364f, 55.393f), \r
+                                                                                                               new PointF(71.52402f, 54.64954f), \r
+                                                                                                               new PointF(85.35734f, 59.14954f), \r
+                                                                                                               new PointF(82.3909f, 58.45626f), \r
+                                                                                                               new PointF(96.8909f, 60.78959f), \r
+                                                                                                               new PointF(94.50352f, 60.51069f), \r
+                                                                                                               new PointF(109.8369f, 61.67735f), \r
+                                                                                                               new PointF(108.7007f, 61.61112f), \r
+                                                                                                               new PointF(125.034f, 62.27779f), \r
+                                                                                                               new PointF(124.944f, 62.27424f), \r
+                                                                                                               new PointF(143.4256f, 62.9783f), \r
+                                                                                                               new PointF(163.835f, 65.00085f), \r
+                                                                                                               new PointF(185.6939f, 68.67461f), \r
+                                                                                                               new PointF(208.6403f, 74.99842f), \r
+                                                                                                               new PointF(232.2171f, 84.42915f), \r
+                                                                                                               new PointF(244.575f, 90.69513f), \r
+                                                                                                               new PointF(257.0276f, 97.85966f), \r
+                                                                                                               new PointF(269.7801f, 106.0213f), \r
+                                                                                                               new PointF(282.9691f, 115.6594f), \r
+                                                                                                               new PointF(296.6128f, 126.4395f), \r
+                                                                                                               new PointF(310.5198f, 138.671f), \r
+                                                                                                               new PointF(289.4801f, 141.329f), \r
+                                                                                                               new PointF(275.6468f, 129.1623f), \r
+                                                                                                               new PointF(275.8013f, 129.2909f), \r
+                                                                                                               new PointF(262.3013f, 118.6243f), \r
+                                                                                                               new PointF(262.4312f, 118.7229f), \r
+                                                                                                               new PointF(249.4311f, 109.2229f), \r
+                                                                                                               new PointF(249.6888f, 109.3989f), \r
+                                                                                                               new PointF(237.1888f, 101.3989f), \r
+                                                                                                               new PointF(237.4324f, 101.5466f), \r
+                                                                                                               new PointF(225.2657f, 94.54655f), \r
+                                                                                                               new PointF(225.5994f, 94.72665f), \r
+                                                                                                               new PointF(213.7661f, 88.72665f), \r
+                                                                                                               new PointF(214.5241f, 89.06734f), \r
+                                                                                                               new PointF(192.0241f, 80.06734f), \r
+                                                                                                               new PointF(193.4982f, 80.55679f), \r
+                                                                                                               new PointF(172.3315f, 74.72345f), \r
+                                                                                                               new PointF(174.4351f, 75.18177f), \r
+                                                                                                               new PointF(154.6017f, 71.84844f), \r
+                                                                                                               new PointF(156.4607f, 72.0945f), \r
+                                                                                                               new PointF(137.9607f, 70.26116f), \r
+                                                                                                               new PointF(139.8892f, 70.3924f), \r
+                                                                                                               new PointF(122.3442f, 69.72402f), \r
+                                                                                                               new PointF(105.3928f, 69.03212f), \r
+                                                                                                               new PointF(88.25542f, 67.7282f), \r
+                                                                                                               new PointF(70.95618f, 64.94441f), \r
+                                                                                                               new PointF(54.78223f, 59.68301f), \r
+                                                                                                               new PointF(40.62651f, 51.87922f), \r
+                                                                                                               new PointF(34.02815f, 46.70752f), \r
+                                                                                                               new PointF(27.63626f, 40.83389f), \r
+                                                                                                               new PointF(21.46311f, 33.80336f), \r
+                                                                                                               new PointF(15.52437f, 25.65881f), \r
+                                                                                                               new PointF(9.621692f, 16.21452f), \r
+                                                                                                               new PointF(3.927732f, 5.663945f), \r
+                                                                                                               new PointF(3.749999f, 6.249999f), \r
+                                                                                                               new PointF(326.25f, 6.249999f), \r
+                                                                                                               new PointF(326.2499f, 113.75f), \r
+                                                                                                               new PointF(3.749999f, 113.75f), \r
+                                                                                                               new PointF(26.25f, 110f), \r
+                                                                                                               new PointF(15f, 106.25f), \r
+                                                                                                               new PointF(315f, 106.25f), \r
+                                                                                                               new PointF(303.75f, 110f), \r
+                                                                                                               new PointF(303.75f, 9.999999f), \r
+                                                                                                               new PointF(315f, 13.75f), \r
+                                                                                                               new PointF(15f, 13.75f), \r
+                                                                                                               new PointF(26.25f, 9.999999f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line  |  PathPointType.CloseSubpath), \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line  |  PathPointType.CloseSubpath), \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line  |  PathPointType.CloseSubpath)};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }\r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+\r
+               [Test]\r
+               public void Widen_Pen_Matrix_Float()\r
+               {\r
+                       path = new GraphicsPath ();\r
+                       path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280);\r
+                       path.StartFigure();\r
+                       path.AddRectangle (new Rectangle (10, 20, 200, 200));\r
+\r
+                       Pen pen = new Pen (Color.Red, 15);\r
+\r
+                       Matrix matrix = new Matrix();\r
+                       matrix.Scale(1.5f, 0.5f);\r
+\r
+                       path.Widen (pen, matrix, 0.2f);\r
+\r
+                       PointF [] expectedPoints = new PointF [] {      new PointF(26.08857f, 4.367013f), \r
+                                                                                                               new PointF(28.88857f, 9.817012f), \r
+                                                                                                               new PointF(28.85975f, 9.763281f), \r
+                                                                                                               new PointF(31.70975f, 14.86328f), \r
+                                                                                                               new PointF(31.67857f, 14.80965f), \r
+                                                                                                               new PointF(34.57857f, 19.60965f), \r
+                                                                                                               new PointF(34.5436f, 19.55396f), \r
+                                                                                                               new PointF(37.4436f, 24.00396f), \r
+                                                                                                               new PointF(37.39977f, 23.93945f), \r
+                                                                                                               new PointF(40.29977f, 28.03945f), \r
+                                                                                                               new PointF(40.25008f, 27.972f), \r
+                                                                                                               new PointF(43.20008f, 31.82199f), \r
+                                                                                                               new PointF(43.09911f, 31.69899f), \r
+                                                                                                               new PointF(49.09911f, 38.54898f), \r
+                                                                                                               new PointF(48.90694f, 38.35032f), \r
+                                                                                                               new PointF(55.05694f, 44.15032f), \r
+                                                                                                               new PointF(54.77378f, 43.90996f), \r
+                                                                                                               new PointF(61.07379f, 48.75996f), \r
+                                                                                                               new PointF(60.64857f, 48.46797f), \r
+                                                                                                               new PointF(67.04858f, 52.41797f), \r
+                                                                                                               new PointF(66.42046f, 52.07551f), \r
+                                                                                                               new PointF(73.02045f, 55.27551f), \r
+                                                                                                               new PointF(72.11205f, 54.89137f), \r
+                                                                                                               new PointF(78.86205f, 57.39137f), \r
+                                                                                                               new PointF(77.63413f, 57.00044f), \r
+                                                                                                               new PointF(84.58413f, 58.90044f), \r
+                                                                                                               new PointF(83.11855f, 58.56083f), \r
+                                                                                                               new PointF(90.31853f, 59.96083f), \r
+                                                                                                               new PointF(88.90129f, 59.72806f), \r
+                                                                                                               new PointF(96.2513f, 60.72805f), \r
+                                                                                                               new PointF(94.81331f, 60.56914f), \r
+                                                                                                               new PointF(102.3633f, 61.21914f), \r
+                                                                                                               new PointF(101.4567f, 61.15424f), \r
+                                                                                                               new PointF(109.3067f, 61.60424f), \r
+                                                                                                               new PointF(108.7323f, 61.57637f), \r
+                                                                                                               new PointF(125.1848f, 62.23045f), \r
+                                                                                                               new PointF(143.1808f, 63.05786f), \r
+                                                                                                               new PointF(153.344f, 63.83537f), \r
+                                                                                                               new PointF(163.8406f, 65.00166f), \r
+                                                                                                               new PointF(174.5957f, 66.60938f), \r
+                                                                                                               new PointF(185.6805f, 68.76014f), \r
+                                                                                                               new PointF(197.0758f, 71.55418f), \r
+                                                                                                               new PointF(208.587f, 75.10439f), \r
+                                                                                                               new PointF(220.3038f, 79.37941f), \r
+                                                                                                               new PointF(232.2803f, 84.50476f), \r
+                                                                                                               new PointF(244.5031f, 90.61616f), \r
+                                                                                                               new PointF(256.9783f, 97.77407f), \r
+                                                                                                               new PointF(263.386f, 101.7725f), \r
+                                                                                                               new PointF(269.8497f, 106.0477f), \r
+                                                                                                               new PointF(276.4059f, 110.6218f), \r
+                                                                                                               new PointF(283.0547f, 115.5449f), \r
+                                                                                                               new PointF(289.7812f, 120.8047f), \r
+                                                                                                               new PointF(296.6029f, 126.3632f), \r
+                                                                                                               new PointF(303.5159f, 132.3174f), \r
+                                                                                                               new PointF(310.5394f, 138.5884f), \r
+                                                                                                               new PointF(289.4605f, 141.2115f), \r
+                                                                                                               new PointF(282.4605f, 134.9615f), \r
+                                                                                                               new PointF(282.5082f, 135.0034f), \r
+                                                                                                               new PointF(275.6582f, 129.1034f), \r
+                                                                                                               new PointF(275.7375f, 129.1699f), \r
+                                                                                                               new PointF(268.9875f, 123.6699f), \r
+                                                                                                               new PointF(269.051f, 123.7205f), \r
+                                                                                                               new PointF(262.401f, 118.5205f), \r
+                                                                                                               new PointF(262.4915f, 118.5893f), \r
+                                                                                                               new PointF(255.9415f, 113.7393f), \r
+                                                                                                               new PointF(256.049f, 113.8166f), \r
+                                                                                                               new PointF(249.599f, 109.3166f), \r
+                                                                                                               new PointF(249.7036f, 109.3877f), \r
+                                                                                                               new PointF(243.3536f, 105.1877f), \r
+                                                                                                               new PointF(243.477f, 105.2669f), \r
+                                                                                                               new PointF(237.227f, 101.3669f), \r
+                                                                                                               new PointF(237.4224f, 101.4837f), \r
+                                                                                                               new PointF(225.2224f, 94.48374f), \r
+                                                                                                               new PointF(225.5894f, 94.68011f), \r
+                                                                                                               new PointF(213.7894f, 88.78011f), \r
+                                                                                                               new PointF(214.2746f, 89.00435f), \r
+                                                                                                               new PointF(202.8246f, 84.10435f), \r
+                                                                                                               new PointF(203.3942f, 84.32931f), \r
+                                                                                                               new PointF(192.2942f, 80.27931f), \r
+                                                                                                               new PointF(192.9597f, 80.50254f), \r
+                                                                                                               new PointF(182.2597f, 77.20254f), \r
+                                                                                                               new PointF(183.2339f, 77.47076f), \r
+                                                                                                               new PointF(172.8339f, 74.92076f), \r
+                                                                                                               new PointF(173.8405f, 75.14091f), \r
+                                                                                                               new PointF(163.7905f, 73.19091f), \r
+                                                                                                               new PointF(164.8466f, 73.37167f), \r
+                                                                                                               new PointF(155.1466f, 71.92167f), \r
+                                                                                                               new PointF(156.1924f, 72.05755f), \r
+                                                                                                               new PointF(146.7424f, 71.00755f), \r
+                                                                                                               new PointF(147.7834f, 71.10496f), \r
+                                                                                                               new PointF(138.6334f, 70.40496f), \r
+                                                                                                               new PointF(139.6128f, 70.46482f), \r
+                                                                                                               new PointF(122.2128f, 69.66482f), \r
+                                                                                                               new PointF(122.4177f, 69.6736f), \r
+                                                                                                               new PointF(105.7794f, 69.01213f), \r
+                                                                                                               new PointF(97.18594f, 68.51952f), \r
+                                                                                                               new PointF(88.45159f, 67.76756f), \r
+                                                                                                               new PointF(79.66547f, 66.57217f), \r
+                                                                                                               new PointF(71.00809f, 64.88879f), \r
+                                                                                                               new PointF(62.7075f, 62.61956f), \r
+                                                                                                               new PointF(54.89606f, 59.72644f), \r
+                                                                                                               new PointF(47.53793f, 56.15886f), \r
+                                                                                                               new PointF(40.61982f, 51.88909f), \r
+                                                                                                               new PointF(33.97219f, 46.77147f), \r
+                                                                                                               new PointF(27.58867f, 40.75123f), \r
+                                                                                                               new PointF(21.44726f, 33.73978f), \r
+                                                                                                               new PointF(18.42414f, 29.79435f), \r
+                                                                                                               new PointF(15.47745f, 25.62836f), \r
+                                                                                                               new PointF(12.53827f, 21.11823f), \r
+                                                                                                               new PointF(9.605241f, 16.26356f), \r
+                                                                                                               new PointF(6.725243f, 11.10988f), \r
+                                                                                                               new PointF(3.911426f, 5.632986f), \r
+                                                                                                               new PointF(3.749999f, 6.249999f), \r
+                                                                                                               new PointF(326.25f, 6.249999f), \r
+                                                                                                               new PointF(326.2499f, 113.75f), \r
+                                                                                                               new PointF(3.749999f, 113.75f), \r
+                                                                                                               new PointF(26.25f, 110f), \r
+                                                                                                               new PointF(15f, 106.25f), \r
+                                                                                                               new PointF(315f, 106.25f), \r
+                                                                                                               new PointF(303.75f, 110f), \r
+                                                                                                               new PointF(303.75f, 9.999999f), \r
+                                                                                                               new PointF(315f, 13.75f), \r
+                                                                                                               new PointF(15f, 13.75f), \r
+                                                                                                               new PointF(26.25f, 9.999999f)};\r
+                       \r
+                       for(int i = 0; i < path.PointCount; i++) {\r
+                               DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]);\r
+                       }\r
+\r
+                       byte [] expectedTypes = new byte [] {   (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line  |  PathPointType.CloseSubpath), \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line  |  PathPointType.CloseSubpath), \r
+                                                                                                       (byte) PathPointType.Start, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) PathPointType.Line, \r
+                                                                                                       (byte) (PathPointType.Line  |  PathPointType.CloseSubpath)};\r
+\r
+                       for (int i=0; i < expectedTypes.Length; i++) {\r
+                               Assert.AreEqual (expectedTypes [i], path.PathTypes [i]);\r
+                       }\r
+\r
+                       t.Graphics.DrawPath (p, path);\r
+                       t.Show ();\r
+                       //t.AssertCompare ();\r
+               }\r
+\r
+//             foreach(PointF point in path.PathPoints) {\r
+//                     Console.WriteLine("new PointF({0}f, {1}f), ",point.X, point.Y);\r
+//             }\r
+//             foreach(PathPointType type in path.PathTypes) {\r
+//                     Console.WriteLine("(byte) PathPointType.{0}, ",type);\r
+//             }\r
+       }\r
+}\r
index 60a3728d0cb1ee44d1c42fa19ad9bca07706c7d2..163a14cbd8b1bed9f1b86436cf14ff3de0ff88b1 100644 (file)
                     SubType = "Code"\r
                     BuildAction = "Compile"\r
                 />\r
+                <File\r
+                    RelPath = "DrawingTest\Test\GraphicsPath.cs"\r
+                    SubType = "Code"\r
+                    BuildAction = "Compile"\r
+                />\r
                 <File\r
                     RelPath = "DrawingTest\Test\Image.cs"\r
                     SubType = "Code"\r
index 1b0072461091667f3adb1136751ba9a745423f0a..ccff71aa44eee673d4f660a3d0ab6a4d3e2f7bcd 100644 (file)
@@ -24,6 +24,7 @@
                                <File RelPath="DrawingTest\Test\Bitmap1.png" BuildAction="None"/>\r
                                <File RelPath="DrawingTest\Test\Brush.cs" SubType="Code" BuildAction="Compile"/>\r
                                <File RelPath="DrawingTest\Test\Graphics.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="DrawingTest\Test\GraphicsPath.cs" SubType="Code" BuildAction="Compile"/>\r
                                <File RelPath="DrawingTest\Test\Image.cs" SubType="Code" BuildAction="Compile"/>\r
                                <File RelPath="DrawingTest\Test\Pen.cs" SubType="Code" BuildAction="Compile"/>\r
                                <File RelPath="DrawingTest\Test\Region.cs" SubType="Code" BuildAction="Compile"/>\r