Line2DPathEffect fill the closed path badly.

61 views
Skip to first unread message

庄小龙

unread,
May 17, 2022, 5:13:09 AM5/17/22
to skia-discuss
Hello, I run into one issue when use Line2DPathEffect. Can someone help here? Thanks very much.
sample code:
The result:
The filled lines don't end on the border. They go beyond or don't get to the border.

1652778561486.jpg

Andy Zhuang

unread,
May 17, 2022, 6:52:44 AM5/17/22
to skia-discuss
And also SkPath2DPathEffect has the same problem.

Brian Osman

unread,
May 17, 2022, 9:02:23 AM5/17/22
to skia-d...@googlegroups.com
It's not a great solution, but if you also clip to the path, none of the tiled paths will extend outside the bounds: https://fiddle.skia.org/c/a52b91041898a6c62df27eb90a7be222

There is still the issue that the left-edge is jagged, because of how the tiling starts.

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/8683e072-3b17-4da6-b17d-c5728706a543n%40googlegroups.com.

Andy Zhuang

unread,
May 17, 2022, 10:33:18 PM5/17/22
to skia-discuss
Thanks for your reply.
About the jag at the left edge, the solution I can find out is to use a path with bigger region to draw the Line2DPathEffect. But it may be time costly.
Any other suggestions for the issue?

Reply all
Reply to author
Forward
0 new messages