/// <inheritdoc/> protected override void OnRender(DrawingContext drawingContext) { var itemPoints = TransformedShapeDefinition.ToArray(); var geometry = CreatePathFigure(itemPoints); drawingContext.DrawGeometry(_itemBrush, _itemPen, geometry); var offsetLines = OffsetLines.ToArray(); var offsetGeometry = CreatePathFigure(offsetLines); drawingContext.DrawGeometry(null, _cutPen, offsetGeometry); }
protected override void OnRender(DrawingContext drawingContext) { refreshOfffsetLines(); var _itemBrush = new SolidColorBrush(Color.FromArgb(128, 255, 64, 64)); var _itemPen = new Pen(Brushes.DarkRed, 1.0); var _cutPen = new Pen(Brushes.Blue, 2.0); var itemPoints = TransformedShapeDefinition.ToArray(); var geometry = CreatePathFigure(itemPoints); drawingContext.DrawGeometry(_itemBrush, _itemPen, geometry); var offsetLines = OffsetLines.ToArray(); var offsetGeometry = CreatePathFigure(offsetLines); drawingContext.DrawGeometry(null, _cutPen, offsetGeometry); }