public override void Render(ViewPort port, Graphics canvas, Pen pen)
        {
            var polyPath = new GraphicsPath();

            polyPath.AddPolygon((from p in IterPoints() select(PointF) port.ScreenCoord(p.X, p.Y)).ToArray());
            if (holes != null)
            {
                foreach (var poly in holes)
                {
                    polyPath.AddPolygon((from p in poly.IterPoints() select(PointF) port.ScreenCoord(p.X, p.Y)).ToArray());
                }
            }
            canvas.FillPath(pen.Brush, polyPath);
        }
Beispiel #2
0
        // 绘制接口
        public override void Render(ViewPort port, Graphics canvas, Pen pen)
        {
            PointF pt = port.ScreenCoord(X, Y);

            canvas.DrawLine(pen, pt, new PointF(pt.X, pt.Y + 0.01f));
        }