I have a PathGeometry defining some path like this:
source path http://devblog.ailon.org/devblog/_stuff/wpfpathgeoquestion/original.gif
This is a simplified example. In fact, it can have segments of any type (Line, Arc, Bezier).
Now I need to cut out a hole of some kind and size (square, circle, etc.) in the nodes of the segment, so the final result looks something like this:
with holes http://devblog.ailon.org/devblog/_stuff/wpfpathgeoquestion/with_holes.gif
My initial idea was to combine the original PathGeometry with other geometries containing squares (or something else) at the joint points using GeometryCombineMode.Exclude. Unfortunately, this creates empty geometry if the path is not filled. And if it is full, it produces the wrong result.
So I'm stuck. In a simple example with line segments, I could calculate the boundary points in advance and make my line segments complete there, but with arcs and beziers it would be a sort of sorting.
Does anyone have an idea how to do this?
Note. I need these holes to be erased (transparent), so placing a white square above it will not work.
geometry wpf pathgeometry
Alan mendelevich
source share