Hi! I'm in the process of reimplementing some functionality which I added to the GeoTools core (switching layers/labels on/off and layer/label transparency - see http://sourceforge.net/mailarchive/message.php?msg_id=29875628) without any modifications on the GeoTools side. I'm mostly done with this task but I have some problems with label transparency. I need to associate an opacity value with each label item and then group them by their opacity and draw on temporary image which is then composed with the map image. I don't see an elegant way to achieve this (drawing the labels and theirs decorations with the same opacity) without actually extending existing LabelCacheImpl class. I thought about wrapping LabelCacheImpl with a wrapper which would intercept all invocations of put method, record all passed parameters and when the end method is called, use the wrapped LabelCacheImpl to draw all those cached labels on temporary graphics, grouping them by priority and opacity. But one of the put method's parameter is a Feature, so it would cause all rendered features to be cached in memory for the whole rendering operation. To avoid this I need to extend LabelCacheImpl class (which now is final) and provide custom subclass of LabelPainter and LabelCacheItem. So I propose to remove the final modifier from LabelCacheImpl declaration and also refactor LabelPainter and LabelCacheItem instantiation to separate protected methods. Is it possible that the LableCacheImpl class would be refactored?
Here is my proposal for the refactoring: https://github.com/sgraca/geotools/commit/c546432b668243f5b93f67e7c9ccf07d6fc3bb0b -- Institute of Spatial and Cadastral Systems tel: +48 32 301 10 74 fax: +48 32 301 10 77 e-mail: [email protected] http://www.ispik.pl ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ GeoTools-Devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
