public GraphicsPath ()\r
{\r
Status status = GDIPlus.GdipCreatePath (FillMode.Alternate, out nativePath);\r
- GDIPlus.CheckStatus (status); \r
+ GDIPlus.CheckStatus (status);\r
}\r
\r
- [MonoTODO]\r
public GraphicsPath (FillMode fillMode)\r
{\r
- throw new NotImplementedException ();\r
+ Status status = GDIPlus.GdipCreatePath (fillMode, out nativePath);\r
+ GDIPlus.CheckStatus (status);\r
}\r
\r
- [MonoTODO]\r
public GraphicsPath (Point[] pts, byte[] types)\r
{\r
- throw new NotImplementedException ();\r
+ Status status = GDIPlus.GdipCreatePath2 (\r
+ ConvertPoints (pts), types, pts.Length, FillMode.Alternate, out nativePath);\r
+ GDIPlus.CheckStatus (status);\r
}\r
\r
- [MonoTODO]\r
public GraphicsPath (PointF[] pts, byte[] types)\r
{\r
- throw new NotImplementedException ();\r
+ Status status = GDIPlus.GdipCreatePath2 (pts, types, pts.Length, FillMode.Alternate, out nativePath);\r
+ GDIPlus.CheckStatus (status);\r
}\r
\r
- [MonoTODO]\r
- public GraphicsPath (Point[] pts, byte[] types, FillMode fillMode)\r
+ public GraphicsPath (Point[] pts, byte[] types, FillMode fillMode)\r
{\r
- throw new NotImplementedException (); \r
+ Status status = GDIPlus.GdipCreatePath2 (\r
+ ConvertPoints (pts), types, pts.Length, fillMode, out nativePath);\r
+ GDIPlus.CheckStatus (status);\r
}\r
\r
- [MonoTODO]\r
- public GraphicsPath(PointF[] pts, byte[] types, FillMode fillMode)\r
+ public GraphicsPath(PointF[] pts, byte[] types, FillMode fillMode)\r
{\r
- throw new NotImplementedException ();\r
+ Status status = GDIPlus.GdipCreatePath2 (pts, types, pts.Length, fillMode, out nativePath);\r
+ GDIPlus.CheckStatus (status);\r
+ }\r
+\r
+ PointF [] ConvertPoints (Point [] pt)\r
+ {\r
+ int length = pt.Length; \r
+ PointF [] pf = new PointF [length];\r
+\r
+ for (int i = 0; i < length; i++)\r
+ pf [i] = pt [i];\r
+\r
+ return pf;\r
}\r
\r
- \r
public object Clone ()\r
{\r
IntPtr clone;\r
\r
internal IntPtr NativeObject{\r
\r
- get{\r
- return nativePath;\r
- }\r
- set {\r
- nativePath = value;\r
- }\r
- }\r
+ get {\r
+ return nativePath;\r
+ }\r
+ set {\r
+ nativePath = value;\r
+ }\r
+ }\r
\r
//\r
// AddArc\r
\r
public void AddArc (int x, int y, int width, int height, float start_angle, float sweep_angle)\r
{\r
- Status status = GDIPlus.GdipAddPathArcI (nativePath, x, y, width, height, start_angle, sweep_angle); \r
+ Status status = GDIPlus.GdipAddPathArcI (nativePath, x, y, width, height, start_angle, sweep_angle);\r
GDIPlus.CheckStatus (status); \r
}\r
\r
\r
for (int i = 0; i < length - 2; i += 2) {\r
int j = i + 1;\r
- Status status = GDIPlus.GdipAddPathLineI (nativePath, points [i].X, points [i].Y, points [j].X, points [j].Y);\r
+ Status status = GDIPlus.GdipAddPathLineI (\r
+ nativePath, points [i].X, points [i].Y, points [j].X, points [j].Y);\r
GDIPlus.CheckStatus (status); \r
}\r
}\r
\r
for (int i = 0; i < length - 2; i += 2) {\r
int j = i + 1;\r
- Status status = GDIPlus.GdipAddPathLine (nativePath, points [i].X, points [i].Y, points [j].X, points [j].Y);\r
+ Status status = GDIPlus.GdipAddPathLine (\r
+ nativePath, points [i].X, points [i].Y, points [j].X, points [j].Y);\r
GDIPlus.CheckStatus (status); \r
}\r
}\r
//\r
public void AddPie (Rectangle rect, float startAngle, float sweepAngle)\r
{\r
- Status status = GDIPlus.GdipAddPathPie (nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);\r
+ Status status = GDIPlus.GdipAddPathPie (\r
+ nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);\r
GDIPlus.CheckStatus (status); \r
}\r
\r