Description
svg2tvgt currently lists defs, linearGradient, radialGradient, and pattern as unsupported elements, reporting an error and marking conversion as "not fully supported."
However, TinyVG natively supports both linear and radial gradients. It should be possible to resolve <linearGradient> and <radialGradient> from <defs> and map them to TVG gradient styles when an element references them via fill="url(#id)" or stroke="url(#id)".
Example
<defs>
<linearGradient id="g1" x1="0" y1="0" x2="100" y2="0">
<stop offset="0%" stop-color="red" />
<stop offset="100%" stop-color="blue" />
</linearGradient>
</defs>
<rect x="0" y="0" width="100" height="50" fill="url(#g1)" />
This currently fails even though TVG can represent it.
Patterns
Patterns (<pattern>) have no TVG equivalent, so those would still need to be flagged as unsupported. But gradients seem like low-hanging fruit since the format already has the primitives for them.
Description
svg2tvgtcurrently listsdefs,linearGradient,radialGradient, andpatternas unsupported elements, reporting an error and marking conversion as "not fully supported."However, TinyVG natively supports both linear and radial gradients. It should be possible to resolve
<linearGradient>and<radialGradient>from<defs>and map them to TVG gradient styles when an element references them viafill="url(#id)"orstroke="url(#id)".Example
This currently fails even though TVG can represent it.
Patterns
Patterns (
<pattern>) have no TVG equivalent, so those would still need to be flagged as unsupported. But gradients seem like low-hanging fruit since the format already has the primitives for them.