private void DrawPoint(PointShape shape, MappingConverter converter)
        {
            Color      color = Color.FromArgb(shape.Color.R, shape.Color.G, shape.Color.B);
            SolidBrush brush = new SolidBrush(color);

            Vertex center = new Vertex(shape.X, shape.Y);
            PointF point  = converter.GetMappingPoint(center);
            float  radius = converter.GetPenWidth(shape.Width) / 2f;

            graphics.FillEllipse(brush, point.X - radius, point.Y - radius, radius * 2, radius * 2);
        }
        private void DrawCircle(CircleShape shape, MappingConverter converter)
        {
            Color  color  = Color.FromArgb(shape.Color.R, shape.Color.G, shape.Color.B);
            Pen    pen    = new Pen(color, converter.GetPenWidth(shape.Width));
            PointF center = converter.GetMappingPoint(shape.Center);

            Vertex rightMostVertex = new Vertex(shape.Center.X + shape.Raduis, shape.Center.Y);
            float  radius          = converter.GetMappingDistance(shape.Center, rightMostVertex);

            graphics.DrawEllipse(pen, center.X - radius, center.Y - radius, radius * 2, radius * 2);
        }
        private void DrawLine(LineShape shape, MappingConverter converter)
        {
            Color color = Color.FromArgb(shape.Color.R, shape.Color.G, shape.Color.B);
            Pen   pen   = new Pen(color, converter.GetPenWidth(shape.Width));

            PointF[] points = new PointF[shape.Vertexes.Count];
            for (int i = 0; i < shape.Vertexes.Count; i++)
            {
                points[i] = converter.GetMappingPoint(shape.Vertexes[i]);
            }

            if (shape.Vertexes[0].GeometryEqual(shape.Vertexes[shape.Vertexes.Count - 1]))
            {
                graphics.DrawPolygon(pen, points);
            }
            else
            {
                graphics.DrawLines(pen, points);
                DrawPoint(new PointShape(shape.Vertexes[0], shape.Width, shape.Color), converter);
                DrawPoint(new PointShape(shape.Vertexes[shape.Vertexes.Count - 1], shape.Width, shape.Color), converter);
            }
        }