From: Andrea A. <and...@al...> - 2004-02-03 08:43:37
|
I've been thinking about the idea of having a class that allows to change on the fly the geometry and style of a rendered feature. In theory this would support any kind of shape and color manipulation, that is, selection, hightlight, and other dynamic transformations. Nice. But I'm concerned about its performance. Let's say I want to highlight a feature under the mouse, what I have to do? It seems that the steps are: 1) compute the feature bounding box, and alter it according to the geometric manipulation that is needed 2) inform the rendered shape transformer of what we expect it to do (pass to it the feature id of the feature that has to be hightlighted) 3) ask the renderer to redraw the above bounding box In 3 the renderer will have to re-render every layer in that bounding box area, and not only the one that contains the transformed features, since we can use various kind of transparency and alpha blending settings to compose the final map. Would it be slow, in particular if there is some complex geometry in other layers and in the same bbox? I've checked a bit and it seems to me that in other drawing applications the selection always stays on top, which means that can be rendered on a separate layer, that would allow us to use the double buffer of the map for fast redraw, and then draw the selection/hightlight on top of it... Best regards Andrea Aime |