Beispiel #1
0
        public override void Draw(ViewInterface view)
        {
            GraphicsPath path = new GraphicsPath();

            path.StartFigure(); // Start the first figure.
            path.AddEllipse((float)(Point.X) - 1, (float)view.Height - (float)Point.Y - 1, 2, 2);
            path.CloseFigure(); // Second figure is closed.

            view.SetPenColor(this.BrushColor);
            view.Path(path);
        }
Beispiel #2
0
        public override void Draw(ViewInterface view)
        {
            view.SetPenColor(this.PenColor);

            GraphicsPath path = new GraphicsPath();

            path.StartFigure(); // Start the first figure.
            path.AddLine((float)(Edge.Org.X), (float)view.Height - (float)Edge.Org.Y, (float)Edge.Dest.X, (float)view.Height - (float)Edge.Dest.Y);
            path.CloseFigure(); // Second figure is closed.

            view.Path(path);
        }
Beispiel #3
0
        public override void Draw(ViewInterface view)
        {
            var points = new PointF[this.Polygon.Size()];

            for (int i = 0; i < this.Polygon.Size(); i++, this.Polygon.Advance(Rotation.CLOCKWISE))
            {
                points[i] = new PointF((float)this.Polygon.Point().X, (float)view.Height - (float)this.Polygon.Point().Y);
            }

            GraphicsPath path = new GraphicsPath();

            path.StartFigure(); // Start the first figure.
            path.AddLines(points);
            path.CloseFigure(); // Second figure is closed.

            view.SetPenColor(this.PenColor);
            view.Path(path);
        }