On 23 May 2011 02:03, Alexander Dymchishin <[email protected]> wrote: > I am sorry, but don't understand. Did you mean, that 2.7.1 version hasn't > flashing? I tried to update through maven and run SelectionLab, and flashing > does exist. When you select item, or just clicked in frame area, in repaints > with flashing. > What steps should I take to avoid flashing when repaint?
My fault for sending a late night reply that wasn't very clear. I meant that rewriting of the gt-swing module has started, and the first parts of this were included in version 2.7.1. More changes will appear in coming versions, coordinated with changes to the render module (new Layer classes and replacement of MapContext with MapContent). The first changes involved delaying updating the map pane until the GeoTools renderer has finished drawing into an intermediate image, and then blitting that image to the screen. This was done to prevent long periods of blank display when working with slow data connections, but I had hoped it would also reduce flickering generally. However, as you note, the changes haven't made any noticeable difference to the SelectionLab example. In the SelectionLab program, the whole map is being repainted after the "selection" style is applied to the layer. The flashing will be worse when displaying complex and/or multiple layers. Ideally you would only render that part of the map that needs updating. In the SelectionLab example this would be the bounds of the selected feature. However, Andrea (who maintains the render module) has advised that this won't work with the GeoTools StreamingRenderer class used by JMapPane Another approach, which I haven't tested at all, would be to create a new layer containing only the selected features and submit this to the renderer in a separate, temporary MapContent instance (the replacement for MapContext), and then put the resulting intermediate image over the top of the main image. But this will also fail if the layers "underneath" include feature labelling or other style elements that will be obscured by the top image. Andrea, Jody and others here may have more useful answers for you. Meanwhile, the best I can suggest is to keep in touch regarding the next changes to gt-swing and gt-render and contribute any ideas, patches or test cases which you think will help. Michael ------------------------------------------------------------------------------ What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
