triangle gradient mesh

126 views
Skip to first unread message

craste...@gmail.com

unread,
Apr 20, 2023, 9:19:19 PM4/20/23
to skia-discuss
In OpenGL, you can specify a bunch of points and associate colors with each.
Then you can say to draw them as a triangle mesh that is either a strip or a fan.
The triangles will be filled with gradient values blending each corner of those triangles.

Does Skia have anything similar?

Greg Daniel

unread,
Apr 20, 2023, 9:32:06 PM4/20/23
to skia-discuss
drawVertices should do what you're looking for. drawMesh is an even more flexible version that shows customizable shaders but from your description I believe vertices is what your want.

--
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/ea0fef09-d414-45bf-a1fe-cd42ca31f143n%40googlegroups.com.

craste...@gmail.com

unread,
Apr 20, 2023, 11:25:28 PM4/20/23
to skia-discuss
Ah, thanks!  I saw that at one point and mistook SkVertice with SkPoint.  Which left me wondering how to associate a color with the point.
Reply all
Reply to author
Forward
0 new messages