Example #1
0
 protected PolygonF(Polygon ply)
     : this()
 {
     PolygonF polyf = PolygonF.FromPolygon(ply);
     this.AddRange(polyf._pnts.ToArray());
 }
Example #2
0
 //***************************************************************************
 // Static Methods
 // 
 public static PolygonF FromPolygon(Polygon poly)
 {
     return new PolygonF(poly.GetPoints().Select(p => new PointF(p.X, p.Y)).ToArray());
 }
Example #3
0
 public static void FillShape(Polygon ply, Graphics g, Brush b)
 {
     using (GraphicsPath path = ply.GetShape())
         g.FillPath(b, path);
 }
Example #4
0
 public static void DrawShape(Polygon ply, Graphics g, Pen p)
 {
     using (GraphicsPath path = ply.GetShape())
         g.DrawPath(p, path);
 }
Example #5
0
 public static Polygon Offset(Polygon ply, int x, int y)
 { return Polygon.Truncate(PolygonF.Offset(ply._ply, (float)x, (float)y)); }
Example #6
0
 public static Polygon Scale(Polygon ply, int width, int height)
 { return Polygon.Truncate(PolygonF.Scale(ply._ply, (float)width, (float)height)); }
Example #7
0
 public static Polygon Rotate(Polygon ply, float degrees, Point center)
 { return Polygon.Truncate(PolygonF.Rotate(ply._ply, degrees, new PointF((float)center.X, (float)center.Y))); }