示例#1
0
 public override void DrawLine(CommonGui.Drawing.Pen pen, Chaos.Util.Mathematics.Vector2f p1, Chaos.Util.Mathematics.Vector2f p2)
 {
     using (System.Drawing.Pen pen2 = CreatePen(pen))
     {
         InternalGraphics.DrawLine(pen2, p1.Convert(), p2.Convert());
     }
 }
示例#2
0
 public override void DrawCircle(CommonGui.Drawing.Pen pen, Vector2f center, float radius)
 {
     using (System.Drawing.Pen pen2 = CreatePen(pen))
     {
         InternalGraphics.DrawEllipse(pen2, center.X - radius, center.Y - radius, radius * 2, radius * 2);
     }
 }
示例#3
0
 public override void DrawRectangle(CommonGui.Drawing.Pen pen, RectangleF rect)
 {
     using (System.Drawing.Pen pen2 = CreatePen(pen))
     {
         InternalGraphics.DrawRectangle(pen2, rect.Left, rect.Top, rect.Width, rect.Height);
     }
 }
示例#4
0
 public override void DrawPolygon(CommonGui.Drawing.Pen pen, params Vector2f[] points)
 {
     System.Drawing.PointF[] points2 = points.Select(p => new System.Drawing.PointF(p.X, p.Y)).ToArray();
     using (System.Drawing.Pen pen2 = CreatePen(pen))
     {
         InternalGraphics.DrawPolygon(pen2, points2);
     }
 }
示例#5
0
 private static System.Drawing.Pen CreatePen(CommonGui.Drawing.Pen pen)
 {
     return(new System.Drawing.Pen(pen.Color.Convert(), pen.LineWidth));
 }