4 ms·
With a bit more trickery, you can even implement the Non-Zero fill rule (Canvas2D default), instead of the simpler Even-Odd rule. Ejecta now supports both: htt
by phoboslab 13y ago
With a bit more trickery, you can even implement the Non-Zero fill rule (Canvas2D default), instead of the simpler Even-Odd rule. Ejecta now supports both:
https://github.com/phoboslab/Ejecta/blob/master/Source/Ejecta/EJCanvas/2D/EJPath.mm#L361-L396 https://github.com/phoboslab/Ejecta/blob/master/Source/Eject...
- skavish 13y agothis is impressive! btw do you have any numbers on how bezie drawing using OpenGL compares to regular drawing on 2d canvas, performance wise? let's say I have an html5 app which draws stuff using 2d canvas. do you think it makes sense to draw to webgl instead using implementation like yours, i.e. mapping 2d canvas api to webgl?
- mattdesl 13y agoCould I also use this technique to clip a scene to the path of a complex polygon? How does it hold up with many overlapping shapes of varying color; wouldn't it lead to far more state changes and ultimately much greater fill-rate? And what are your thoughts on using this for font rendering? This looks brilliant. Thanks for the info.