Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
        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));
        }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 5
0
 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);
 }
Ejemplo n.º 6
0
 public abstract void DrawNumer(Graphics Graphics, CanvasView View, Font Font, Brush Brush);
Ejemplo n.º 7
0
 public abstract void Draw(Graphics Graphics, Pen Pen, CanvasView View);
Ejemplo n.º 8
0
 public override void DrawNumer(Graphics Graphics, CanvasView View, Font Font, Brush Brush)
 {
 }
Ejemplo n.º 9
0
 public void DrawNumer(Graphics Graphics, CanvasView View, Font Font, Brush Brush)
 {
     foreach (WallPartSection Section in this)
         Section.DrawNumer(Graphics, View, Font, Brush);
 }
Ejemplo n.º 10
0
 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);
     }
 }
Ejemplo n.º 11
0
 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);
 }
Ejemplo n.º 12
0
 public virtual void DrawNumer(Graphics Graphics, CanvasView View, Font Font, Brush Brush)
 {
     StartPoint.Draw(Graphics, View, Font, Brush);
     FinishPoint.Draw(Graphics, View, Font, Brush);
 }
Ejemplo n.º 13
0
 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);
 }
Ejemplo n.º 14
0
 public override void DrawNumer(Graphics Graphics, CanvasView View, Font Font, Brush Brush)
 {
     StartPoint.Draw(Graphics, View, Font, Brush);
     FinishPiont.Draw(Graphics, View, Font, Brush);
 }
Ejemplo n.º 15
0
 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);
     }
 }
Ejemplo n.º 16
0
 public override void Draw(Graphics Graphics, Pen Pen, CanvasView View)
 {
     foreach (WallPartSection Section in this)
         Section.Draw(Graphics, Pen, View);
 }
Ejemplo n.º 17
0
 public abstract void Draw(Graphics Graphics, CanvasView View, Pointer Start, Pen Pen);
Ejemplo n.º 18
0
        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;
        }