Skip to main content
gamedev.net
🔒 Locked

ZOOM

Started by biowarrior 1 reply 850+ views
Original Post
biowarrior
biowarrior
Hey guys, here me again! Now I would like to know some articles, ideas, whatever about zooming images. I have the following scenario, tiled image, my actual approach is to send a "zoomFactor" to my getTile(x, y) function, which became getTile(x, y, zoomFactor). But some deatails like keep track of center position, make a smooth zoom, are bad. Anyone know any resource of information, or has an idea, strategy, to make a good zoom engine? Sorry for my lack of information, but I'd never do it before.
guilherme
biowarrior
biowarrior
Is there a Framework, component, etc which allows me to manipulate images to create zoom?
guilherme
xycsoscyx
xycsoscyx
I don't know what your framework or limitations are, but instead of a XY and ZoomFactors values, try using source and destination rectangles. This lets you get an exact portion of your source, and map it to an exact portion of your destination, and as long as you can support scaling, then the source and destination rectangles can remain independant of each other.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.