Jesse Ramos created GEOT-3979:
---------------------------------

             Summary: Opacity ignored for Glyph.point/line methods
                 Key: GEOT-3979
                 URL: https://jira.codehaus.org/browse/GEOT-3979
             Project: GeoTools
          Issue Type: Bug
          Components: main, render
    Affects Versions: 2.7.1
            Reporter: Jesse Ramos
            Assignee: Jody Garnett
            Priority: Minor
         Attachments: Glyph.java, SLD.java

Hi,

I'm creating PointSymbolizer, LineSymbolizer, and PolygonSymbolizer's with the 
opacity set for each as follows:

{code}
        StyleFactory styleFactory = CommonFactoryFinder.getStyleFactory(null);
        FilterFactory filterFactory = 
CommonFactoryFinder.getFilterFactory(null);

        Mark mark = styleFactory.createMark(filterFactory.literal(shapeWktName),
                null,
                styleFactory.createFill(filterFactory.literal(color), 
filterFactory.literal(opacity)),
                filterFactory.literal(size), // size
                filterFactory.literal(0)); // rotation
        Graphic graphic = styleFactory.createGraphic(null,
                new Mark[] {mark},
                null,
                filterFactory.literal(opacity), // opacity
                filterFactory.literal(size), // size
                null); // rotation
        return styleFactory.createPointSymbolizer(graphic, null);
{code}

{code}
        StyleFactory styleFactory = CommonFactoryFinder.getStyleFactory(null);
        FilterFactory filterFactory = 
CommonFactoryFinder.getFilterFactory(null);

        return 
styleFactory.createLineSymbolizer(styleFactory.createStroke(filterFactory.literal(color),
 filterFactory.literal(size), filterFactory.literal(opacity)), null);
{code}

{code}
        StyleFactory styleFactory = CommonFactoryFinder.getStyleFactory(null);
        FilterFactory filterFactory = 
CommonFactoryFinder.getFilterFactory(null);

        return 
styleFactory.createPolygonSymbolizer(styleFactory.createStroke(filterFactory.literal(outerColor),
 filterFactory.literal(outerSize)),
                styleFactory.createFill(filterFactory.literal(innerColor), 
filterFactory.literal(opacity)),
                null);
{code}

When adding Styles to a MapContext that have Rules that use these symbolizers 
the resulting image is what I expect. The opacity values are used correctly 
when generating the images.

However, when creating a legend I am using 
Glyph.point(Rule)/line(Rule)/Polygon(Rule) to generate the legend image icons. 
For the Polygon image the legend image opacity matches the Rule that is passed 
in. For point and line, however, the opacity does not change with respect to 
the Rule.

I've attached a couple of files with minor code changes that fix the issue for 
me in case they help. Not sure if they are 100% correct or not but at least 
point out where I think the problems lie.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to