public static UIElement RenderMultiLineString(MultiLineString multiLineString, IStyle style, IViewport viewport) { if (!(style is VectorStyle)) { throw new ArgumentException("Style is not of type VectorStyle"); } var vectorStyle = style as VectorStyle; XamlShapes.Path path = CreateLineStringPath(vectorStyle); path.Data = multiLineString.ToXaml(); path.RenderTransform = new XamlMedia.MatrixTransform { Matrix = CreateTransformMatrix1(viewport) }; return(path); }
public static System.Windows.Shapes.Shape Render(MultiLineString multiLineString, IStyle style, IViewport viewport) { if (!(style is VectorStyle)) { throw new ArgumentException("Style is not of type VectorStyle"); } var vectorStyle = style as VectorStyle; System.Windows.Shapes.Path path = LineStringRenderer.CreateLineStringPath(vectorStyle); path.Data = multiLineString.ToXaml(); path.RenderTransform = new System.Windows.Media.MatrixTransform { Matrix = GeometryRenderer.CreateTransformMatrix1(viewport) }; GeometryRenderer.CounterScaleLineWidth(path, viewport.Resolution); return(path); }