public static void Render(Graphics graphics, MultiLineString lines, Pen pen, IViewport viewport)
 {
     foreach (var lineString in lines.LineStrings)
     {
         LineStringRenderer.Render(graphics, lineString, pen, viewport);
     }
 }
Exemple #2
0
        private void RenderFeature(IViewport viewport, IStyle style, IFeature feature)
        {
            var vectorStyle = style as VectorStyle;

            if (feature.Geometry is Point)
            {
                PointRenderer.Render(Graphics, (Point)feature.Geometry, vectorStyle, viewport);
            }
            else if (feature.Geometry is MultiPoint)
            {
                MultiPointRenderer.Render(Graphics, (MultiPoint)feature.Geometry, vectorStyle, viewport);
            }
            else if (feature.Geometry is LineString)
            {
                LineStringRenderer.Render(Graphics, (LineString)feature.Geometry, vectorStyle.Line.ToGdi(), viewport);
            }
            else if (feature.Geometry is MultiLineString)
            {
                MultiLineStringRenderer.Render(Graphics, (MultiLineString)feature.Geometry, vectorStyle.Line.ToGdi(), viewport);
            }
            else if (feature.Geometry is Polygon)
            {
                PolygonRenderer.DrawPolygon(Graphics, (Polygon)feature.Geometry, vectorStyle.Fill.ToGdi(), vectorStyle.Outline.ToGdi(), viewport);
            }
            else if (feature.Geometry is MultiPolygon)
            {
                MultiPolygonRenderer.Render(Graphics, (MultiPolygon)feature.Geometry, vectorStyle.Fill.ToGdi(), vectorStyle.Outline.ToGdi(), viewport);
            }
            else if (feature.Geometry is IRaster)
            {
                RasterRenderer.Render(Graphics, feature.Geometry, vectorStyle, viewport);
            }
        }