TinyVG / specification

The specification for TinyVG. This is the central authority for the file system

Home Page:https://tinyvg.tech/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Proposal] Reduce implementation complexity around stroked gradients

neinseg opened this issue · comments

commented

To me it seems that the spec allows strokes that are "filled" with a gradient. While this allows for some cool graphics, I think it is rarely used and it increases implementation complexity. I would argue that this feature can be dropped (i.e. that the spec should say strokes can only be filled with a solid color), since where it is actually needed the same result can be achieved by simply converting the stroke to an outline before saving as TinyVG. During conversion from SVG this can even be done automatically using path offsetting.

Looking at it from an implementation point of view, a software line renderer can reuse the same code for sampling a style as the fill renderer, and for a GPU implementation, it actually reduces complexity as the exact same code can be used to draw lines and fills, only the triangulation process is different.

I'll reject that change, as a outline with gradient can give nice 3D effects and still has a smaller encoding than using a fill path.

Can someone share experience about how it looks with existing drawing libraries? Do they support such a feature? If not, this decision might be reconsidered.