public override void Draw(Graphics Graphics, CanvasView View, Pointer Start, Pen Pen) { Pen.DashStyle = DashStyle; PointF StartF = View.TranslateF(Start); PointF FinishF = View.TranslateF(this.Finish(Start)); Graphics.DrawLine(Pen, StartF, FinishF); }
public override void Draw(Graphics Graphics, Pen Pen, CanvasView View) { Pen.Width += 2; PointF PointF = View.TranslateF(StartPoint.Pointer); Graphics.DrawLine(Pen, PointF.X - 5, PointF.Y - 5, PointF.X + 5, PointF.Y + 5); Graphics.DrawLine(Pen, PointF.X - 5, PointF.Y + 5, PointF.X + 5, PointF.Y - 5); Pen.Width -= 2; }
public override void Draw(Graphics Graphics, Pen Pen, CanvasView View) { float R = (float)(Radius * View.Zoom); PointF C = View.TranslateF(Center); RectangleF RectangleF = new RectangleF(C.X - R, C.Y - R, 2 * R, 2 * R); Graphics.DrawArc(Pen, RectangleF, (float)(View.Translate(Center).Phi * 180 / Math.PI), -(View.Mirrow ? -1 : 1) * (float)(Alpha * 180 / Math.PI)); }
public static void DrawZoom(Graphics Graphics, CanvasView View, int Width, int Height) { double M = 100 * View.Zoom; while (M > 0.8 * Width) M /= 10; Pen ZoomPen = new Pen(Color.Magenta, 2); Graphics.DrawLine(ZoomPen, 10, Height - 10, 10 + (int)M, Height - 10); Graphics.DrawLine(ZoomPen, 10, Height - 10, 10, Height - 13); Graphics.DrawLine(ZoomPen, 10 + (int)M, Height - 10, 10 + (int)M, Height - 13); Graphics.DrawString((M / View.Zoom).ToString("N2") + " м", new Font("Arial", 8), new SolidBrush(Color.Green), 10 + (float)M, Height - 18); }
public void Draw(Graphics Graphics, CanvasView View, Font Font, Brush Brush) { PointF p = View.TranslateF(Pointer.PointF); p.X += 0; p.Y += 0; Graphics.DrawString(Numer.ToString(), Font, Brush, p); }
public abstract void DrawNumer(Graphics Graphics, CanvasView View, Font Font, Brush Brush);
public abstract void Draw(Graphics Graphics, Pen Pen, CanvasView View);
public override void DrawNumer(Graphics Graphics, CanvasView View, Font Font, Brush Brush) { }
public void DrawNumer(Graphics Graphics, CanvasView View, Font Font, Brush Brush) { foreach (WallPartSection Section in this) Section.DrawNumer(Graphics, View, Font, Brush); }
public void Draw(Graphics Graphics, CanvasView View, Pointer Start, Pen Pen) { foreach (SplintContour Contour in this) { Contour.Draw(Graphics, View, Start, Pen); Start = Contour.Finish(Start); } }
public override void Draw(Graphics Graphics, Pen Pen, CanvasView View) { PointF StartF = View.TranslateF(StartPoint.Pointer); PointF FinishF = View.TranslateF(this.Finish(StartPoint.Pointer)); Graphics.DrawLine(Pen, StartF, FinishF); }
public virtual void DrawNumer(Graphics Graphics, CanvasView View, Font Font, Brush Brush) { StartPoint.Draw(Graphics, View, Font, Brush); FinishPoint.Draw(Graphics, View, Font, Brush); }
private void pn_Paint(object sender, PaintEventArgs e) { SplintComponent SplintCompontent = new SplintComponent( (Tag as TfMain).dsSplints, (Tag as TfMain).dsLines, Convert.ToInt32(lcb.SelectedValue), StartType, Convert.ToDouble(edValue.Value), 0, 0); CanvasView View = new CanvasView(20, 20, 0, 200, true); Pointer Start = new Pointer(0, 0, -Math.PI / 2); View = View.AutoZoom(SplintCompontent.Border(View, Start), pn.Width, pn.Height, 0.15, 0.25); View = View.AutoStart(SplintCompontent.Border(View, Start), pn.Width, pn.Height); SplintCompontent.Draw(e.Graphics, View, Start, new Pen(Color.Black, 2)); DrawEx.DrawZoom(e.Graphics, View, pn.Width, pn.Height); }
public override void DrawNumer(Graphics Graphics, CanvasView View, Font Font, Brush Brush) { StartPoint.Draw(Graphics, View, Font, Brush); FinishPiont.Draw(Graphics, View, Font, Brush); }
public void DrawArrow(Graphics Graphics, CanvasView View, int Width, int Height) { Pen ZoomPen = new Pen(Color.Brown, 1); int LWidth = Width - 30; int LHeight = Height - 30; if (CorniceType != 3) { Graphics.DrawLine(ZoomPen, LWidth + 8, LHeight + 10, LWidth + 8, LHeight + 20); Graphics.DrawLine(ZoomPen, LWidth + 16, LHeight + 10, LWidth + 16, LHeight + 20); Graphics.DrawLine(ZoomPen, LWidth + 12, LHeight, LWidth, LHeight + 12); Graphics.DrawLine(ZoomPen, LWidth + 12, LHeight, LWidth + 24, LHeight + 12); } else { Graphics.DrawLine(ZoomPen, LWidth + 10, LHeight + 8, LWidth + 20, LHeight + 8); Graphics.DrawLine(ZoomPen, LWidth + 10, LHeight + 16, LWidth + 20, LHeight + 16); Graphics.DrawLine(ZoomPen, LWidth, LHeight + 12, LWidth + 14, LHeight); Graphics.DrawLine(ZoomPen, LWidth, LHeight + 12, LWidth + 14, LHeight + 24); } }
public override void Draw(Graphics Graphics, Pen Pen, CanvasView View) { foreach (WallPartSection Section in this) Section.Draw(Graphics, Pen, View); }
public abstract void Draw(Graphics Graphics, CanvasView View, Pointer Start, Pen Pen);
public RectangleF Border(CanvasView View, Pointer Start) { RectangleF RectangleF = new RectangleF( (float)View.Translate(Start).X, (float)View.Translate(Start).Y, 1, 1); foreach (SplintContour Contour in this) { Start = Contour.Finish(Start); RectangleF = BorderWall(RectangleF, View.Translate(Start).PointF); } return RectangleF; }