Ciao Andrea Thanks a lot! Your hint was just right...
If anybody is interested, here is how geoserver 1.5 creates symbols to represent the styles of the rules in its legend. Little sample features are created > /** > * Just a holder to avoid creating many polygon shapes from inside > * <code>getSampleShape()</code> > */ > private LiteShape2 sampleRect; > private LiteShape2 sampleLine; > private LiteShape2 samplePoint; and later a StyledShapePainter is used to paint the rule's styles to a Graphics object. > /** > * Singleton shape painter to serve all legend requests. We can use a > * single shape painter instance as long as it remains thread safe. > */ > private static final StyledShapePainter shapePainter = new > StyledShapePainter(null); > shapePainter.paint(graphics, shape, style2d, scaleDenominator); Full code can be found here: http://svn.codehaus.org/geoserver/trunk/geoserver/wms/src/main/java/org/vfny/geoserver/wms/responses/DefaultRasterLegendProducer.java Thanks for the quick help.. That was my first question to the list, and the experience was very cheerful. Stefan, Bonn, Germany ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
