Equivalent to css preserve-3d

34 views
Skip to first unread message

Joe

unread,
Jul 5, 2022, 9:45:37 PM7/5/22
to skia-discuss
I’m wondering how to get SkCanvas to honor the 3d transforms of shapes drawn to it so they paint in the correct order based on z-distance from the “camera”. That is, do what css-3d does: https://developer.mozilla.org/en-US/docs/Web/CSS/transform-style. Is there something explicit the caller needs to do?

Brian Osman

unread,
Jul 6, 2022, 9:09:46 AM7/6/22
to skia-d...@googlegroups.com
Yes, this is something the caller needs to manage - Skia never does sorting/reordering like this.

On Tue, Jul 5, 2022 at 9:45 PM Joe <nick...@gmail.com> wrote:
I’m wondering how to get SkCanvas to honor the 3d transforms of shapes drawn to it so they paint in the correct order based on z-distance from the “camera”. That is, do what css-3d does: https://developer.mozilla.org/en-US/docs/Web/CSS/transform-style. Is there something explicit the caller needs to do?

--
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/4a92556b-cad9-4431-95f6-edfc44856fe6n%40googlegroups.com.

Joe

unread,
Jul 6, 2022, 9:23:02 AM7/6/22
to skia-discuss
Thanks for confirming. Are there any good examples of doing this you can point me to? Or are there libraries that handle this already that integrate with Skia that you're aware of?
Reply all
Reply to author
Forward
0 new messages