internal static void SetFill(PdfRenderContext context, Brush brush, double width, double height)
        {
            var fill = PdfColorHelper.ConvertBrush(brush, context.opacity, context.drawingSurface.Position, width, height);

            context.drawingSurface.GraphicProperties.IsFilled  = fill != null;
            context.drawingSurface.GraphicProperties.FillColor = fill;
        }
        internal static void SetStroke(PdfRenderContext context, double thickness, Brush brush, double width, double height, DoubleCollection dashArray)
        {
            var stroke = PdfColorHelper.ConvertBrush(brush, context.opacity, context.drawingSurface.Position, width, height);

            context.drawingSurface.GraphicProperties.IsStroked = thickness != 0 && stroke != null;

            if (context.drawingSurface.GraphicProperties.IsStroked)
            {
                context.drawingSurface.GraphicProperties.StrokeThickness = thickness;
                context.drawingSurface.GraphicProperties.StrokeColor     = stroke;

                if (dashArray != null)
                {
                    context.drawingSurface.GraphicProperties.StrokeDashArray = dashArray;
                }
            }
        }