本文整理汇总了C#中ICanvas.DrawLine方法的典型用法代码示例。如果您正苦于以下问题:C# ICanvas.DrawLine方法的具体用法?C# ICanvas.DrawLine怎么用?C# ICanvas.DrawLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICanvas
的用法示例。
在下文中一共展示了ICanvas.DrawLine方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Draw
public override void Draw(ICanvas canvas, RectangleF unitrect)
{
Color color = Color;
Brush B = Brushes.Black;
Pen pen = canvas.CreatePen(color, Width);
if (Highlighted || Selected)
{
pen = Canvas.DrawTools.DrawUtils.SelectedPen;
if (m_p1.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p1);
if (m_p2.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p2);
if (m_p3.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p3);
B = Brushes.Magenta;
}
canvas.DrawLine(canvas, pen, m_p1, m_p2);
pen = new Pen(pen.Color, (float)3);
if (horizontal)
{
canvas.DrawLine(canvas, pen, m_p2, new UnitPoint(m_p2.X + 0.2, m_p2.Y));
canvas.Graphics.DrawRectangle(pen, canvas.ToScreen(new UnitPoint(m_p2.X + 0.2, 1)).X, canvas.ToScreen(new UnitPoint(1, m_p2.Y + 0.1)).Y, canvas.ToScreen(m_p3).X - canvas.ToScreen(new UnitPoint(m_p2.X + 0.2, 1)).X, canvas.ToScreen(new UnitPoint(1, m_p2.Y - 0.1)).Y - canvas.ToScreen(new UnitPoint(1, m_p2.Y + 0.1)).Y);
float size = (canvas.ToScreen(new UnitPoint(m_p1.X + 1, m_p1.Y)).X - canvas.ToScreen(m_p1).X) / 10;
Font m_font = new System.Drawing.Font("Arial Black", size, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
canvas.Graphics.DrawString("Recorder", m_font, B, canvas.ToScreen(new UnitPoint(m_p2.X + 0.25, m_p2.Y - 0.1)).X, canvas.ToScreen(new UnitPoint(m_p2.X - 0.3, m_p2.Y + 0.1)).Y);
}
else
{
canvas.DrawLine(canvas, pen, m_p2, new UnitPoint(m_p2.X, m_p2.Y - 0.2));
canvas.Graphics.DrawRectangle(pen, canvas.ToScreen(new UnitPoint(m_p2.X - 0.4, 1)).X, canvas.ToScreen(new UnitPoint(1, m_p2.Y - 0.2)).Y, canvas.ToScreen(new UnitPoint(m_p2.X + 0.4, 1)).X - canvas.ToScreen(new UnitPoint(m_p2.X - 0.4, 1)).X, canvas.ToScreen(new UnitPoint(1, m_p2.Y - 0.4)).Y - canvas.ToScreen(new UnitPoint(1, m_p2.Y - 0.2)).Y);
float size = (canvas.ToScreen(new UnitPoint(m_p1.X + 1, m_p1.Y)).X - canvas.ToScreen(m_p1).X) / 10;
Font m_font = new System.Drawing.Font("Arial Black", size, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
canvas.Graphics.DrawString("Recorder", m_font, B, canvas.ToScreen(new UnitPoint(m_p2.X - 0.35, 1)).X, canvas.ToScreen(new UnitPoint(1, m_p2.Y - 0.2)).Y);
}
}
示例2: Draw
public override void Draw(ICanvas canvas, RectangleF unitrect)
{
Color color = Color;
Pen pen = canvas.CreatePen(color, Width);
if (Highlighted || Selected)
{
pen = Canvas.DrawTools.DrawUtils.SelectedPen;
if (m_p1.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p1);
if (m_p2.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p2);
//if ((m_p3.X != m_p2.X + 1 || m_p3.Y != m_p2.Y) && this.horizontal) m_p3 = new UnitPoint(m_p2.X + 1, m_p2.Y);
//if (m_p3.Y != m_p2.Y + 1 && !this.horizontal) m_p3 = new UnitPoint(m_p2.X, m_p2.Y + 1);
if (m_p3.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p3);
if (m_p4.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p4);
}
canvas.DrawLine(canvas, pen, m_p1, m_p2);
pen = new Pen(pen.Color, (float)4);
if (horizontal)
{
canvas.DrawLine(canvas, pen, new UnitPoint(m_p2.X + 0.1, m_p2.Y), new UnitPoint(m_p2.X + 0.51, m_p2.Y + 0.4));
canvas.DrawLine(canvas, pen, new UnitPoint(m_p2.X + 0.9, m_p2.Y), new UnitPoint(m_p2.X + 0.49, m_p2.Y + 0.4));
canvas.Graphics.DrawRectangle(pen, canvas.ToScreen(new UnitPoint(m_p2.X + 0.2, 1)).X, canvas.ToScreen(new UnitPoint(1, m_p2.Y + 0.1)).Y, canvas.ToScreen(new UnitPoint(m_p2.X + 0.8, 1)).X - canvas.ToScreen(new UnitPoint(m_p2.X + 0.2, 1)).X, canvas.ToScreen(new UnitPoint(1, m_p2.Y - 0.6)).Y - canvas.ToScreen(new UnitPoint(1, m_p2.Y - 0.1)).Y);
}
else
{
canvas.DrawLine(canvas, pen, new UnitPoint(m_p2.X - 0.4, m_p2.Y-0.5), new UnitPoint(m_p2.X + 0.01, m_p2.Y ));
canvas.DrawLine(canvas, pen, new UnitPoint(m_p2.X + 0.4, m_p2.Y-0.5), new UnitPoint(m_p2.X + -0.01, m_p2.Y ));
canvas.Graphics.DrawRectangle(pen, canvas.ToScreen(new UnitPoint(m_p2.X - 0.3, 1)).X, canvas.ToScreen(new UnitPoint(1, m_p2.Y - 0.4)).Y, canvas.ToScreen(new UnitPoint(m_p2.X + 0.8, 1)).X - canvas.ToScreen(new UnitPoint(m_p2.X + 0.2, 1)).X, canvas.ToScreen(new UnitPoint(1, m_p2.Y - 0.6)).Y - canvas.ToScreen(new UnitPoint(1, m_p2.Y - 0.1)).Y);
}
}
示例3: Draw
public override void Draw(ICanvas canvas, RectangleF unitrect)
{
Color color = Color;
Pen pen = canvas.CreatePen(color, Width);
if (Highlighted || Selected)
{
pen = Canvas.DrawTools.DrawUtils.SelectedPen;
//if (m_p1.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p1);
}
pen = new Pen(pen.Color, (float)3);
unitrect.Inflate(3, 3);
canvas.DrawArc(canvas,pen,m_p1,(float)0.15,0,360);
canvas.DrawLine(canvas, pen, m_p1, new UnitPoint(m_p1.X, m_p1.Y + 0.12));
canvas.DrawLine(canvas, pen, m_p1, new UnitPoint(m_p1.X+0.08, m_p1.Y - 0.08));
}
示例4: Draw
public override void Draw(ICanvas canvas, RectangleF unitrect)
{
Color color = Color;
Pen pen = canvas.CreatePen(color, Width);
if (Highlighted || Selected)
{
pen = Canvas.DrawTools.DrawUtils.SelectedPen;
if (m_p1.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p1);
if (m_p2.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p2);
if (m_p3.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p3);
if (m_p4.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p4);
}
canvas.DrawLine(canvas, pen, m_p1, m_p2);
if(m_p4!=m_p3)canvas.DrawLine(canvas, pen, m_p3, m_p4);
pen = new Pen(pen.Color, (float)3);
canvas.DrawLine(canvas,pen,m_p2,m_p3);
}
示例5: DrawTextBox
void DrawTextBox (ICanvas c, string text, Point point, Font f)
{
var b = new SolidBrush (Colors.Black);
var bp = new Pen (Colors.Blue);
var rp = new Pen (Colors.Red);
var size = c.MeasureText (text, f);
c.DrawRectangle (new Rect (point, size.Size) + new Size (0, -size.Ascent), bp);
c.DrawLine (point, point + new Size (size.Width, 0), rp);
c.DrawText (text, point, f, b);
}
示例6: Draw
public override void Draw(ICanvas canvas, RectangleF unitrect)
{
Color color = Color;
Pen pen = canvas.CreatePen(color, Width);
if (Highlighted || Selected)
{
pen = Canvas.DrawTools.DrawUtils.SelectedPen;
if (m_p1.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p1);
if (m_p2.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p2);
//if ((m_p3.X != m_p2.X + 1 || m_p3.Y != m_p2.Y) && this.horizontal) m_p3 = new UnitPoint(m_p2.X + 1, m_p2.Y);
//if (m_p3.Y != m_p2.Y + 1 && !this.horizontal) m_p3 = new UnitPoint(m_p2.X, m_p2.Y + 1);
if (m_p3.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p3);
if (m_p4.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p4);
}
canvas.DrawLine(canvas, pen, m_p1, m_p2);
if(m_p4 != m_p3)canvas.DrawLine(canvas, pen, m_p3, m_p4);
pen = new Pen(pen.Color, (float)4);
pen.DashStyle = DashStyle.Dash;
canvas.DrawLine(canvas,pen,m_p2,m_p3);
}
示例7: Draw
public override void Draw(ICanvas canvas, RectangleF unitrect)
{
Color color = Color;
Pen pen = canvas.CreatePen(color, Width);
if (Highlighted || Selected)
{
pen = Canvas.DrawTools.DrawUtils.SelectedPen;
if (m_p1.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p1);
if (m_p2.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p2);
if (m_p3.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p3);
if (m_p4.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p4);
}
canvas.DrawLine(canvas, pen, m_p1, m_p2);
if (m_p3 != m_p4) canvas.DrawLine(canvas, pen, m_p3, m_p4);
pen = new Pen(pen.Color, (float)3);
if (horizontal)
{
canvas.DrawLine(canvas, pen, m_p2, new UnitPoint(m_p2.X+0.2,m_p2.Y));
canvas.DrawLine(canvas, pen, m_p3, new UnitPoint(m_p2.X + 0.8, m_p2.Y));
canvas.DrawArc(canvas, pen, new UnitPoint(m_p2.X + 0.61, m_p2.Y), (float)0.19, 0, 360);
canvas.DrawArc(canvas, pen, new UnitPoint(m_p2.X + 0.39, m_p2.Y), (float)0.19, 0, 360);
}
else
{
canvas.DrawLine(canvas, pen, m_p2, new UnitPoint(m_p2.X , m_p2.Y- 0.2));
canvas.DrawLine(canvas, pen, m_p3, new UnitPoint(m_p2.X , m_p2.Y- 0.8));
canvas.DrawArc(canvas, pen, new UnitPoint(m_p2.X , m_p2.Y-0.61), (float)0.19, 0, 360);
canvas.DrawArc(canvas, pen, new UnitPoint(m_p2.X , m_p2.Y-0.39), (float)0.19, 0, 360);
}
}
示例8: Draw
public override void Draw(ICanvas canvas, RectangleF unitrect)
{
Color color = Color;
Pen pen = canvas.CreatePen(color, Width);
if (Highlighted || Selected)
{
pen = Canvas.DrawTools.DrawUtils.SelectedPen;
if (m_p1.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p1);
if (m_p2.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p2);
//if ((m_p3.X != m_p2.X + 1 || m_p3.Y != m_p2.Y) && this.horizontal) m_p3 = new UnitPoint(m_p2.X + 1, m_p2.Y);
//if (m_p3.Y != m_p2.Y + 1 && !this.horizontal) m_p3 = new UnitPoint(m_p2.X, m_p2.Y + 1);
if (m_p3.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p3);
if (m_p4.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p4);
}
canvas.DrawLine(canvas, pen, m_p1, m_p2);
if (m_p4 != m_p3) canvas.DrawLine(canvas, pen, m_p3, m_p4);
pen = new Pen(pen.Color, (float)3);
if (horizontal)
{
canvas.DrawLine(canvas, pen, m_p2, new UnitPoint(m_p2.X + 0.2, m_p2.Y));
canvas.DrawArc(canvas, pen, new UnitPoint(m_p2.X + 0.2, m_p2.Y), (float)0.03, 0, 360);
if (isclosed()) canvas.DrawLine(canvas, pen, new UnitPoint(m_p2.X + 0.2, m_p2.Y), new UnitPoint(m_p2.X + 0.8, m_p2.Y+0.05));
else canvas.DrawLine(canvas, pen, new UnitPoint(m_p2.X + 0.2, m_p2.Y), new UnitPoint(m_p2.X + 0.8, m_p2.Y + 0.4));
canvas.DrawArc(canvas, pen, new UnitPoint(m_p2.X + 0.8, m_p2.Y), (float)0.03, 0, 360);
canvas.DrawLine(canvas, pen, new UnitPoint(m_p2.X + 0.8, m_p2.Y), m_p3);
}
else
{
canvas.DrawLine(canvas, pen, m_p2, new UnitPoint(m_p2.X, m_p2.Y - 0.2));
canvas.DrawArc(canvas, pen, new UnitPoint(m_p2.X, m_p2.Y - 0.2), (float)0.03, 0, 360);
if (isclosed()) canvas.DrawLine(canvas, pen, new UnitPoint(m_p2.X, m_p2.Y + 0.2), new UnitPoint(m_p2.X , m_p2.Y- 0.8));
else canvas.DrawLine(canvas, pen, new UnitPoint(m_p2.X, m_p2.Y - 0.2), new UnitPoint(m_p2.X + 0.4, m_p2.Y - 0.8));
canvas.DrawArc(canvas, pen, new UnitPoint(m_p2.X , m_p2.Y- 0.8), (float)0.03, 0, 360);
canvas.DrawLine(canvas, pen, new UnitPoint(m_p2.X, m_p2.Y -0.8), m_p3);
}
}
示例9: Draw
public virtual void Draw(ICanvas canvas, RectangleF unitrect)
{
Color color = Color;
Pen pen = canvas.CreatePen(color, Width);
pen.EndCap = System.Drawing.Drawing2D.LineCap.Round;
pen.StartCap = System.Drawing.Drawing2D.LineCap.Round;
canvas.DrawLine(canvas, pen, m_p1, m_p2);
if (Highlighted)
canvas.DrawLine(canvas, DrawUtils.SelectedPen, m_p1, m_p2);
if (Selected)
{
canvas.DrawLine(canvas, DrawUtils.SelectedPen, m_p1, m_p2);
if (m_p1.IsEmpty == false)
DrawUtils.DrawNode(canvas, m_p1);
if (m_p2.IsEmpty == false)
DrawUtils.DrawNode(canvas, m_p2);
}
}
示例10: DrawElement
protected override void DrawElement(ICanvas canvas)
{
canvas.DrawLine(start, end, Pen);
}
示例11: Draw
public override void Draw(ICanvas canvas, Rect rect)
{
// base.Draw(canvas, rect);
canvas.DrawLine(rect.Left, rect.Top, rect.Width, rect.Top, _custLineColour, 3);
canvas.DrawLine(rect.Left, rect.Height, rect.Width, rect.Height, _custLineColour, 3);
var font = new Font {Size = 20};
var pen = new Pen(Colors.Blue, width: 10);
var brush = new SolidBrush(Colors.White);
canvas.DrawRectangle(new Point(20, 20), new Size(20), pen, brush);
//canvas.DrawText("B", rect, font, TextAlignment.Center, pen);
}
示例12: Draw
public override void Draw(ICanvas canvas, RectangleF unitrect)
{
Color color = Color;
Pen pen = canvas.CreatePen(color, Width);
if (Highlighted || Selected)
{
pen = Canvas.DrawTools.DrawUtils.SelectedPen;
if (m_p1.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p1);
if (m_p2.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p2);
//if ((m_p3.X != m_p2.X + 1 || m_p3.Y != m_p2.Y) && this.horizontal) m_p3 = new UnitPoint(m_p2.X + 1, m_p2.Y);
//if (m_p3.Y != m_p2.Y + 1 && !this.horizontal) m_p3 = new UnitPoint(m_p2.X, m_p2.Y + 1);
if (m_p3.IsEmpty == false) Canvas.DrawTools.DrawUtils.DrawNode(canvas, m_p3);
}
canvas.DrawLine(canvas, pen, m_p1, m_p2);
pen = new Pen(pen.Color, (float)3);
if (horizontal)
{
canvas.DrawLine(canvas, pen, m_p2, new UnitPoint(m_p2.X + 0.2,m_p2.Y));
canvas.DrawLine(canvas, pen, m_p3, new UnitPoint(m_p2.X + 0.8, m_p2.Y));
canvas.DrawLine(canvas, pen, new UnitPoint(m_p2.X + 0.2, m_p2.Y-0.3), new UnitPoint(m_p2.X + 0.8, m_p2.Y+0.3));
canvas.DrawLine(canvas, pen, new UnitPoint(m_p2.X + 0.25, m_p2.Y+0.20), new UnitPoint(m_p2.X + 0.55, m_p2.Y+0.20));
canvas.DrawLine(canvas, pen, new UnitPoint(m_p2.X + 0.25, m_p2.Y + 0.25), new UnitPoint(m_p2.X + 0.35, m_p2.Y + 0.25));
canvas.DrawLine(canvas, pen, new UnitPoint(m_p2.X + 0.45, m_p2.Y + 0.25), new UnitPoint(m_p2.X + 0.55, m_p2.Y + 0.25));
canvas.DrawArc(canvas, pen, new UnitPoint(m_p2.X + 0.70, m_p2.Y - 0.2), (float)0.05, 0, 180);
canvas.DrawArc(canvas, pen, new UnitPoint(m_p2.X + 0.60, m_p2.Y - 0.2), (float)0.05, 0, -180);
canvas.Graphics.DrawRectangle(pen, canvas.ToScreen(new UnitPoint(m_p2.X + 0.2,1)).X, canvas.ToScreen(new UnitPoint(1, m_p2.Y + 0.3)).Y, canvas.ToScreen(new UnitPoint(m_p2.X + 0.8, 11)).X - canvas.ToScreen(new UnitPoint(m_p2.X + 0.2,1)).X, canvas.ToScreen(new UnitPoint(1, m_p2.Y - 0.3)).Y- canvas.ToScreen(new UnitPoint(1, m_p2.Y + 0.3)).Y);
}
else
{
canvas.DrawLine(canvas, pen, m_p2, new UnitPoint(m_p2.X , m_p2.Y- 0.2));
canvas.DrawLine(canvas, pen, m_p3, new UnitPoint(m_p2.X , m_p2.Y- 0.8));
canvas.DrawLine(canvas, pen, new UnitPoint(m_p2.X - 0.3, m_p2.Y - 0.8), new UnitPoint(m_p2.X + 0.3, m_p2.Y - 0.2));
canvas.DrawLine(canvas, pen, new UnitPoint(m_p2.X - 0.25, m_p2.Y - 0.30), new UnitPoint(m_p2.X + 0.05, m_p2.Y- 0.30));
canvas.DrawLine(canvas, pen, new UnitPoint(m_p2.X - 0.25, m_p2.Y - 0.25), new UnitPoint(m_p2.X - 0.15, m_p2.Y - 0.25));
canvas.DrawLine(canvas, pen, new UnitPoint(m_p2.X - 0.05, m_p2.Y - 0.25), new UnitPoint(m_p2.X + 0.05, m_p2.Y - 0.25));
canvas.DrawArc(canvas, pen, new UnitPoint(m_p2.X + 0.20, m_p2.Y - 0.7), (float)0.05, 0, 180);
canvas.DrawArc(canvas, pen, new UnitPoint(m_p2.X + 0.10, m_p2.Y - 0.7), (float)0.05, 0, -180);
canvas.Graphics.DrawRectangle(pen, canvas.ToScreen(new UnitPoint(m_p2.X - 0.3, 1)).X, canvas.ToScreen(new UnitPoint(1, m_p2.Y - 0.2)).Y, canvas.ToScreen(new UnitPoint(m_p2.X + 0.3, 11)).X - canvas.ToScreen(new UnitPoint(m_p2.X - 0.3, 1)).X, canvas.ToScreen(new UnitPoint(1, m_p2.Y - 0.8)).Y - canvas.ToScreen(new UnitPoint(1, m_p2.Y - 0.2)).Y);
}
}
示例13: DrawNodes
protected virtual void DrawNodes(ICanvas canvas)
{
if (m_curPoint == eCurrentPoint.startAngle && m_lastPoint != UnitPoint.Empty)
canvas.DrawLine(canvas, DrawUtils.SelectedPen, m_center, m_lastPoint);
if (m_curPoint == eCurrentPoint.endAngle && m_lastPoint != UnitPoint.Empty)
canvas.DrawLine(canvas, DrawUtils.SelectedPen, m_center, m_lastPoint);
DrawUtils.DrawNode(canvas, StartAnglePoint);
DrawUtils.DrawNode(canvas, EndAnglePoint);
DrawUtils.DrawNode(canvas, RadiusPoint);
}
示例14: DrawArc
void DrawArc(ICanvas canvas, RectangleF unitrect)
{
Pen pen = canvas.CreatePen(Color, Width);
bool inline = PointsInLine();
double sweep = GetSweep(StartAngle, EndAngle, Direction);
if (inline == false)
canvas.DrawArc(canvas, pen, m_center, m_radius, StartAngle, (float)sweep);
else
{
canvas.DrawLine(canvas, pen, P1, P2);
canvas.DrawLine(canvas, pen, P1, P3);
}
if (Selected)
{
if (inline == false)
canvas.DrawArc(canvas, DrawUtils.SelectedPen, m_center, m_radius, StartAngle, (float)sweep);
else
{
canvas.DrawLine(canvas, DrawUtils.SelectedPen, P1, P2);
canvas.DrawLine(canvas, DrawUtils.SelectedPen, P1, P3);
}
if (m_p1.IsEmpty == false)
{
DrawUtils.DrawNode(canvas, P1);
UnitPoint anglepoint = StartAngleNodePoint(canvas);
if (!anglepoint.IsEmpty)
DrawUtils.DrawTriangleNode(canvas, anglepoint);
anglepoint = EndAngleNodePoint(canvas);
if (!anglepoint.IsEmpty)
DrawUtils.DrawTriangleNode(canvas, anglepoint);
anglepoint = RadiusNodePoint(canvas);
if (!anglepoint.IsEmpty)
DrawUtils.DrawTriangleNode(canvas, anglepoint);
}
if (m_p2.IsEmpty == false)
DrawUtils.DrawNode(canvas, P2);
if (m_p3.IsEmpty == false)
DrawUtils.DrawNode(canvas, P3);
}
}
示例15: Draw3P132
void Draw3P132(ICanvas canvas, RectangleF unitrect)
{
if (m_curPoint == eCurrentPoint.p3)
{
Pen pen = canvas.CreatePen(Color, Width);
canvas.DrawLine(canvas, pen, m_p1, m_p3);
}
if (m_curPoint == eCurrentPoint.p2 || m_curPoint == eCurrentPoint.done)
{
DrawArc(canvas, unitrect);
}
}