Ejemplo n.º 1
0
        public virtual void DrawIntersectedPoints(Graphics g)
        {
            if (IntersectionResults.Count == 0)
            {
                return;
            }
            var points = IntersectionResults.Select(p => p.IntersectionPoints).SelectMany(d => d).ToList();

            Editor2D.DrawPoint(g, points);
        }
Ejemplo n.º 2
0
        public override void Draw(Graphics g)
        {
            //drawing center
            var c   = new PointF(Center.X - Radius, Center.Y - Radius);
            var rec = new RectangleF(c, new SizeF(Radius * 2, Radius * 2));

            //set the pen brush first;
            Pen.Brush = Stroke;
            Pen.Width = Width;
            g.DrawEllipse(Pen, rec);
            g.FillEllipse(Fill, rec);
            Editor2D.DrawPoint(g, Center, CenterPointFill, CenterPointStroke);
            ResetPen();
            DrawIntersectedPoints(g);
        }
Ejemplo n.º 3
0
        //set pen brush
        public override void Draw(Graphics g)
        {
            Pen.Brush = Stroke;
            Pen.Width = Width;

            g.DrawLine(Pen, StartPoint, EndPoint);
            if (DrawPoints)
            {
                Editor2D.DrawPoint(g, StartPoint, PointFill, PointStroke);
                Editor2D.DrawPoint(g, EndPoint, PointFill, PointStroke);
            }

            //draw intersected points
            DrawIntersectedPoints(g);
            //Stroke.Dispose();
            //PointFill.Dispose();
            //PointStroke.Dispose();
        }