public void RenderFilledElements(PlotRendererD2D canvas, System.Windows.Rect chartArea, System.Windows.Media.MatrixTransform PrimitiveTransform) { if (this.FillColor != System.Windows.Media.Colors.Transparent) { GeometryAndFlag gnf = null; if (!_geometryByFactory.TryGetValue(canvas.D2DFactory.NativePointer, out gnf) || gnf.RecalcGeometry) { CalculateGeometry(canvas.D2DFactory, chartArea); } //Brush brush = IsDashed ? (Brush)(ChartUtilities.CreateHatch50(this.FillColor, new Size(2, 2))) : (Brush)(new SolidColorBrush(this.FillColor)); if (_geometryByFactory.TryGetValue(canvas.D2DFactory.NativePointer, out gnf)) { var transformedGeometry = new TransformedGeometry(canvas.D2DFactory, gnf.FilledGeometry, PrimitiveTransform.ToD2D()); var brush = new SolidColorBrush(canvas.RenderTarget, FillColor.ToD2D()); canvas.RenderTarget.FillGeometry(transformedGeometry, brush); } } }