skia path offsetting #2

Skip to first unread message


Sep 13, 2021, 4:30:23 AMSep 13
to skia-discuss
I've tried to reply in the thread above, hovever my messages are getting deleted instantly so I post the follow up here. (

Thank you for the solution for path offsetting. I've found the method working for well-tempered configurations. When the stroke size is large on more complex paths seemingly random triangles appear here and there. For the inverse method (inner strokes) the path seems to dissolve when stroke size gets too large. I haven't analyzed further yet but for me I think the method is only usable if setting proper limits in which everything works well. How could such limits could be determined?

There have been discussions on this board in the past. A message from 2015 Cary (Clark?) posted he was working on an offset algorithm, any news on this? Thank you!


Sep 15, 2021, 5:00:03 AMSep 15
to skia-discuss
To answer my question:
There is another simple way to achieve the effect of stroking a dashed outline with line caps:
First, the path is linearized and an two raw offset curves are computed. 
The offset curves are stroked with any stroke style (e.g. rounded caps).
Next, the original curve is filled on top of the two offset curves.
This works for outside offset curves. For inside curves I suppose this can be achieved with compositing.

Reply all
Reply to author
0 new messages