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 "Patrick Valsecchi (JIRA)" <ji...@apache.org> on 2017/12/08 14:01:04 UTC

[jira] [Commented] (BATIK-985) allow "opacity" attribute on group of paths

    [ https://issues.apache.org/jira/browse/BATIK-985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16283533#comment-16283533 ] 

Patrick Valsecchi commented on BATIK-985:
-----------------------------------------

The fill-opacity trick is not exactly equivalent as a g with an opacity. It is just going to set the default fill-opacity: https://github.com/mapfish/mapfish-print/pull/629

Now, this bug is more than 6 years old... what is the status?

> allow "opacity" attribute on group of paths
> -------------------------------------------
>
>                 Key: BATIK-985
>                 URL: https://issues.apache.org/jira/browse/BATIK-985
>             Project: Batik
>          Issue Type: Bug
>          Components: SVG DOM
>    Affects Versions: 1.7
>         Environment: Operating System: All
> Platform: All
>            Reporter: couk
>            Assignee: Batik Developer's Mailing list
>
> I have a bit of code that uses batik at a low level, and sending SVG with the following elements seems to result in the GraphicsNode not painting anything.
> <g opacity="0.1">
>   <path d="M101.5,325.5c0-37.396,19.75-70.263,49.364-88.731h-5.481C117.096,256.154,98.5,288.693,98.5,325.5
>       c0,36.062,17.85,68.032,45.178,87.543h5.324C120.425,394.373,101.5,362.107,101.5,325.5z"/>
>   <path d="M310.5,325.5c0,36.607-18.925,68.873-47.501,87.543h5.324c27.327-19.511,45.177-51.48,45.177-87.543
>       c0-36.807-18.596-69.346-46.883-88.731h-5.481C290.75,255.237,310.5,288.104,310.5,325.5z"/>
> </g>
> changing "opacity" to "fill-opacity" results in the desired behavior when painting. But according to the SVG spec, opacity should be allowed on groups?
> Here's now the GraphicsNode is created.
> // Parse the SVG document.
> SVGDocument doc = new SAXSVGDocumentFactory(XMLResourceDescriptor.getXMLParserClassName()).createSVGDocument(null, data.inputStream());
> UserAgent userAgent = new UserAgentAdapter();
> BridgeContext ctx = new BridgeContext(userAgent, new DocumentLoader(userAgent));
> ctx.setDynamicState(BridgeContext.STATIC);
> GraphicsNode node = new GVTBuilder().build(ctx, doc);
> Sorry this isn't more detailed - let me know if this isn't enough information.



--
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