This is quite hard for me to explain so I'll use an image as example:
I have defined a StreamGeometry (in code).
When it is drawn with DrawingContext.DrawGeometry
using both Brush to fill and Pen to stroke, the geometry is 'widened' by the Pen Thickness.
Now I'm trying to find if there is a function in WPF that can return this solid widened geometry (in any Geometry format).
So far I tried Geometry.GetWidenedPathGeometry
but that only returns geometry that 'outlines' the border Pen stroke. It has a hole where the fill should be.
I guess I can use GetWidenedPathGeometry
and do some sort of Union with the original geometry, 'filling' the hole. I just want to be sure there isn't an easier or more effective (faster) way.
Also it would be preferable if the geometry can stay a StreamGeometry, but GetWidenedPathGeometry
converts it into (somehow mangled ?) PathGeometry.
Thanks for any advice