/// <summary> /// Function that actually renders the linestring /// </summary> /// <param name="map">The map</param> /// <param name="lineString">The line string to symbolize.</param> /// <param name="graphics">The graphics</param> protected override void OnRenderInternal(Map map, ILineString lineString, Graphics graphics) { var clonedPattern = (GraphicsPath)Pattern.Clone(); var graphicsPath = WarpPathToPath.Warp(LineStringToPath(lineString, map), clonedPattern, true, Interval); if (graphicsPath == null) { return; } // Fill? if (Fill != null) { graphics.FillPath(Fill, graphicsPath); } // Outline if (Line != null) { graphics.DrawPath(Line, graphicsPath); } }
public void SymbolizePaths(Graphics g, IEnumerable <GraphicsPath> paths) { foreach (var graphicsPath in paths) { var clonedPattern = (GraphicsPath)Pattern.Clone(); var warpedPath = WarpPathToPath.Warp(graphicsPath, clonedPattern, true, 0f); if (warpedPath == null) { continue; } if (Fill != null) { g.FillPath(Fill, warpedPath); } if (Line != null) { g.DrawPath(Line, warpedPath); } } }