public void Render(SvgMapRenderer renderer, IFeature f) { VectorStyle style = new VectorStyle { Fill = _fill(f), Stroke = null }; var radius = _radius(f); var pos = new Geometry.Polygon(f.GeoData).Centroid; renderer.SetVectorStyles(style); renderer.AddCircle(radius, pos.x, pos.y); }
private static void SetVectorStyles(SvgWriter writer, VectorStyle vectorStyle) { writer.SetStroke(vectorStyle.Stroke); writer.SetStrokeWidth(vectorStyle.StrokeWidth); writer.SetStrokeOpacity(vectorStyle.StrokeOpacity); writer.SetStrokeLineCap(vectorStyle.StrokeLineCap); writer.SetStrokeLineJoin(vectorStyle.StrokeLineJoin); writer.SetStrokeDashArray(vectorStyle.StrokeDashArray); writer.SetFill(vectorStyle.Fill); writer.SetFillOpacity(vectorStyle.FillOpacity); writer.SetFillRule(vectorStyle.FillRule); }
public void Render(SvgMapRenderer renderer, IFeature f) { double xOffset = 0; foreach (var spotChartColumn in Columns) { VectorStyle style = new VectorStyle { Fill = spotChartColumn.Fill, Stroke = null }; var size = spotChartColumn.GetSize(f); var pos = new Geometry.Polygon(f.GeoData).Centroid; renderer.SetVectorStyles(style); renderer.AddRect(size.Item1, size.Item2, pos.x + xOffset, pos.y + size.Item2); xOffset += size.Item1; } }
public void SetVectorStyles(VectorStyle style) { SetVectorStyles(_svgWriter, style); }