lyze237 / gdx-TinyVG

TinyVG parser and renderer for libGDX
https://svg-to-tvg-server.fly.dev/
Apache License 2.0
25 stars 3 forks source link

Gradients display incorrectly with `CpuSpriteBatch` #16

Closed fgnm closed 2 years ago

fgnm commented 2 years ago

When using the CpuSpriteBatch or any other variant of it, gradients are displayed incorrectly. This is how looks like with normal SpriteBatch: immagine

This is with CpuSpriteBatch: immagine The second color looks disappeared. There might be problems while calculating gradient positions from the Batch.

Thanks ;)

lyze237 commented 2 years ago

We had a discussion a bit in the discord server, and it's better to mark this as not supported.

Here's a workaround deployed by @fgnm on their project: https://github.com/rednblackgames/h2d-libgdx-tinyvg-extension/blob/master/src/main/java/games/rednblack/h2d/extension/tinyvg/CpuTinyVGShapeDrawer.java