Yes it is :-)
However you will need to go into the style object and find the
PolygonSymbolizer that applies to your feature, than look up the Fill
expression and evaluate it against your feature.
There is a class that does some of this work inside GeoTools for the renderer;
however it was not really intended for public consumption.
The reason is that "applies to the feature" is based on the FeatureTypeStyle
and Filters are handled as part of the renderer; and are generally taken care
of by the time we are processing PolygonSymbolizers.
For *simple* styles you can use the SLD utility class to look up the fill (it
will take the first PolygonSymbolizer it finds).
Jody
On 26/08/2010, at 11:18 PM, LSA wrote:
> Hi once again!
>
> I need compute what color the java will use to fill the internals of the
> feature when it will be rendered (for the line it will be stroke, of
> course).
>
> So I need something like this:
>
> java.awt.Color getFillColor(org.geotools.styling.Style style,
> org.opengis.feature.simple.SimpleFeature feature)
> {
> /// here goes the code
>
> filColor is calculated here....
>
> return fillColor;
> }
>
> Is this possible?
>
> Thanks,
> Sergey
>
> ------------------------------------------------------------------------------
> Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
> Be part of this innovative community and reach millions of netbook users
> worldwide. Take advantage of special opportunities to increase revenue and
> speed time-to-market. Join now, and jumpstart your future.
> http://p.sf.net/sfu/intel-atom-d2d
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users