Perhaps I should ask - why do you need the colour? You can grab the colour of a pixel on the screen; or even on the bitmap you draw a feature onto. But a feature by itself has no colour - it is just data. Drawing the feature on the screen uses colour; and you can control the drawing process.
You can perform the same query the drawing routine does in order to determine the colour for a feature (if that is of any help to you). Perhaps you could be specific about what you want to accomplish; right now it seems like you are trying to lift water with a fork. -- Jody Garnett On Monday, 17 October 2011 at 11:32 PM, Alberto Debiasi wrote: > So is it impossible to retrieve the color of a selected feature?!?! > > 2011/10/17 Jody Garnett <[email protected] > (mailto:[email protected])> > > The color is generated from a small recipe called 'style' it provided a lot > > of control. Often the color is made from a formula called an expression. > > > > Examples are "#0000FF" or a function call mapping values to a color or if > > your attribute is already a color you can refer to it by name. > > > > Next time you are in uDig style editor have a look. > > > > But yeah features do not have a colour indeed they are an object and not > > even held in memory during rendering. > > > > Jody Garnett > > > > On 17/10/2011, at 10:48 PM, Alberto Debiasi <[email protected] > > (mailto:[email protected])> wrote: > > > > > Hello everybody, > > > I have a question: > > > > > > In udig it's possible to modify the "style" of a resource (select > > > resource ->left mouse button -> modify style). > > > In this way it's possible to define a color for each feature based from a > > > particolar attribute. > > > > > > My question is: in which way I can retrieve the color of each resource? > > > > > > It doesn't exist for example the method: > > > > > > feature.getColor ???? > > > > > > Alberto > > > _______________________________________________ > > > User-friendly Desktop Internet GIS (uDig) > > > http://udig.refractions.net > > > http://lists.refractions.net/mailman/listinfo/udig-devel > > _______________________________________________ > > udig-users mailing list > > [email protected] (mailto:[email protected]) > > http://lists.refractions.net/mailman/listinfo/udig-users >
_______________________________________________ User-friendly Desktop Internet GIS (uDig) http://udig.refractions.net http://lists.refractions.net/mailman/listinfo/udig-devel
