You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by "simon steiner (JIRA)" <ji...@apache.org> on 2017/09/11 09:04:01 UTC

[jira] [Resolved] (BATIK-1158) using not rendered correctly

     [ https://issues.apache.org/jira/browse/BATIK-1158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

simon steiner resolved BATIK-1158.
----------------------------------
    Resolution: Duplicate

> <mask> using <filter> not rendered correctly
> --------------------------------------------
>
>                 Key: BATIK-1158
>                 URL: https://issues.apache.org/jira/browse/BATIK-1158
>             Project: Batik
>          Issue Type: Bug
>          Components: GVT
>    Affects Versions: 1.8
>         Environment: Ubuntu 14.04, java 1.8.0_60
>            Reporter: Wolfgang Laun
>         Attachments: leo.png, leo.svg
>
>
> This svg below is supposed to create a white polygon on grey background, and is rendered correctly in Firefox. But trying to display in Java using JSVGCanvas shows white stripes in the background. As a workaround, opacity in <use> seems to work. (Original files come from wikipedia's constellations, e.g. en.wikipedia.org/wiki/Leo_(constellation) )
> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="485.028pt" height="456.053pt" viewBox="0 0 485.028 456.053" version="1.1">
> <defs>
> <filter id="alpha" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
>   <feColorMatrix type="matrix" in="SourceGraphic" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
> </filter>
> <mask id="mask0">
>   <g filter="url(#alpha)">
> <rect x="0" y="0" width="486" height="457" style="fill:rgb(100%,100%,100%);fill-opacity:0.149994;stroke:none;"/>
>   </g>
> </mask>
> <g id="surface2">
> <path style=" stroke:none;fill-rule:nonzero;fill:rgb(13.730068%,12.159915%,12.54902%);fill-opacity:1;" d="M 376.316406 213.578125 L 309.726562 248.511719 L 310.457031 254.695312 L 296.265625 256.878906 L 282.4375 258.335938 L 285.347656 287.808594 L 278.070312 289.265625 L 282.4375 339.847656 L 272.976562 340.9375 L 274.070312 350.035156 L 253.328125 114.960938 L 277.707031 112.050781 L 303.90625 108.050781 L 317.003906 66.203125 L 336.652344 61.105469 L 353.027344 55.648438 L 399.605469 206.664062 L 376.316406 213.578125 Z M 0.800781 384.96875 L 420.34375 384.96875 L 420.34375 0.335938 L 0.800781 0.335938 L 0.800781 384.96875 Z M 0.800781 384.96875 "/>
> </g>
> </defs>
> <g id="surface0">
> <use xlink:href="#surface2"  transform="matrix(1,0,0,1,33,18)" mask="url(#mask0)"/>
> <!--use xlink:href="#surface2" transform="matrix(1,0,0,1,33,18)" opacity="0.15"/-->
> </g>
> </svg>
> --------------------------------------
>         JFrame f = new JFrame("Batik");
>         final JPanel panel = new JPanel(new BorderLayout());
> 	JSVGCanvas svgCanvas = new JSVGCanvas();
>         panel.add("Center", svgCanvas);
>         File file = new File( "aaa.svg" );
>         svgCanvas.setURI(file.toURI().toURL().toString());
>         f.getContentPane().add( panel );
>         f.setSize(600, 600);
>         f.setVisible(true);



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org