Пример #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));
 }