How to get the path bound including border?

34 views
Skip to first unread message

Lucida

unread,
Jan 28, 2024, 10:20:24 PM1/28/24
to skia-discuss
Some effects like shadow, blur or non-width zero border will contribute to its visual region.
It's not accurate to just use the original path bound to clip. I was wondering there are some APIs that can help to get the actual visual bound. I think it's not reliable to compute the visual bound manually, since the final visual region is depending on the skia's implementation.

Brian Salomon

unread,
Jan 29, 2024, 9:30:23 AM1/29/24
to skia-d...@googlegroups.com
You could try SkPaint::computeFastBounds(). 

On Sun, Jan 28, 2024 at 10:20 PM Lucida <shuol...@gmail.com> wrote:
Some effects like shadow, blur or non-width zero border will contribute to its visual region.
It's not accurate to just use the original path bound to clip. I was wondering there are some APIs that can help to get the actual visual bound. I think it's not reliable to compute the visual bound manually, since the final visual region is depending on the skia's implementation.

--
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/84b26745-9bc7-4929-a586-e85fe5ca0be5n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages