PDA

View Full Version : Zooming



shobha
04-07-2003, 03:23 AM
Hello,

My problem is I have a picture displayed on the window and i want to select part of the picture and zoom it.Can I please get code for this as i'm doing project in opengl in linux platform.

Thank You

Gavin
04-07-2003, 01:27 PM
use mouse pos to draw the selection. This will give you a rectangle area. and use bottom left top right corners x1y1 x2y2. You want to translate the centre of this rectangle to the centre of the screen. And then you zoom this selection to fit your window... find the ratio to zoom by by compariing your window size with you selection size...