Re: offset attribute should be set to 0 if it is missing in the stop tag

2020-10-08 Thread Kirill Grouchnikov
Github repository appears to be the mirror of
https://svn.apache.org/viewvc/xmlgraphics/ where the "real" work is
happening, so probably it would be better to propose this patch in that
original location.



On Wed, Oct 7, 2020 at 4:26 PM Konstantin Bulenkov 
wrote:

> Hello everyone,
>
> Some time ago, I've submitted a PR at
> https://github.com/apache/xmlgraphics-batik/pull/20 but had no attention
> since then.
>
> Many modern design tools like Figma and others do not put offset attribute
> when generating an SVG image if offset equals 0. See
> https://www.w3.org/TR/SVG/pservers.html#GradientStopAttributes
>
> Batik fails with exception while trying to read such Ss. Other programs
> successfully open these files.
> The pull request sets offset to 0 when the attribute is missing.
>
> The patch is available here
> https://github.com/apache/xmlgraphics-batik/pull/20/commits/20ad4382a0a4613956d1e543002e81b235ad1561
>
> or as a patch file
> https://github.com/apache/xmlgraphics-batik/pull/20/commits/20ad4382a0a4613956d1e543002e81b235ad1561.patch
>
>
> Please review and merge if possible.
>
>
> With best regards,
>
>   Konstantin
>
>
> Example of an icon:
>
>  xmlns="http://www.w3.org/2000/svg;>
>  fill="url(#paint0_linear)"/>
> 
> 
> 
> 
> 
>   fill="white"/>
> 
> 
>  y2="17.3385" gradientUnits="userSpaceOnUse">
> 
> 
> 
> 
> 
> 
>  y2="1.6674" gradientUnits="userSpaceOnUse">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  y2="39.1256" gradientUnits="userSpaceOnUse">
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  y2="18.7675" gradientUnits="userSpaceOnUse">
> 
> 
> 
> 
> 
>
>


offset attribute should be set to 0 if it is missing in the stop tag

2020-10-07 Thread Konstantin Bulenkov
Hello everyone,

Some time ago, I've submitted a PR at
https://github.com/apache/xmlgraphics-batik/pull/20 but had no attention
since then.

Many modern design tools like Figma and others do not put offset attribute
when generating an SVG image if offset equals 0. See
https://www.w3.org/TR/SVG/pservers.html#GradientStopAttributes

Batik fails with exception while trying to read such Ss. Other programs
successfully open these files.
The pull request sets offset to 0 when the attribute is missing.

The patch is available here
https://github.com/apache/xmlgraphics-batik/pull/20/commits/20ad4382a0a4613956d1e543002e81b235ad1561

or as a patch file
https://github.com/apache/xmlgraphics-batik/pull/20/commits/20ad4382a0a4613956d1e543002e81b235ad1561.patch


Please review and merge if possible.


With best regards,

  Konstantin


Example of an icon:

http://www.w3.org/2000/svg;>