Original Post
🔒 Locked
Elastic box selection
Advertisement
Quote:It looks like you're asking about zooming in on a rectangular region, which was recently under discussion here.
Original post by fram
Hi,
how can I draw an elastic box selection (see example http://www.finn.no/kart ) without redraw all?
thanks
fram
It also looks like this is a 2D problem, which means the solution will be much more straightforward than those presented in the other thread.
Not sure what you mean by 'without redraw all' though. Perhaps you could clarify your question a bit.
Quote:
Original post by jyk
It also looks like this is a 2D problem, which means the solution will be much more straightforward than those presented in the other thread.
Not sure what you mean by 'without redraw all' though. Perhaps you could clarify your question a bit.
Thanks
The problem in not how to zoom, but how to draw the elastic box without redraw all objects, while dragging the mouse that modify the elastic box.
Now I'm using the window canvas functions (moveto, lineto), but it don't work very well.
Regards
fram
To prevent redraw, you could save your frame buffer that you don't want to redraw. Use the saved image to display, and then draw your rectangle over it.
Draw Scene
Copy scene to texture
While redrawing rectangle
Clear buffer
draw saved scene
draw rectangle
loop
Something like that might work for you.
Draw Scene
Copy scene to texture
While redrawing rectangle
Clear buffer
draw saved scene
draw rectangle
loop
Something like that might work for you.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement