comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Zooming Object Graphics
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Zooming Object Graphics [message #35331] Wed, 11 June 2003 06:02
darrick.white is currently offline  darrick.white
Messages: 7
Registered: January 2003
Junior Member
I'm trying to zoom a 2-D image without data transformation. I'm
currently using the viewplane property of IDLgrView. This is the
simplest way for me to achieve my zooming feature of my application
without using normalized data. My viewplane algorithm is as follows,
taking into consideration the current position of the cursor:

; Zoom window according to size of view port, not size of image
view[0] = view[0] + ROUND((!CONFIG.ZoomScale) * (
FLOAT((*pInfo).xCoord) / dim[0] ))
view[1] = view[1] + ROUND((!CONFIG.ZoomScale) * (
FLOAT((*pInfo).yCoord) / dim[1] ))
view[2] = (view[2] - !CONFIG.ZoomScale) > 1
view[3] = (view[3] - !CONFIG.ZoomScale) > 1

This works great on an image with the same x/y dimensions. All pixels
look symmetrical, as expected. As soon as the image dimensions change
(open a different image. ie. 1900x2250), zooming the image makes the
pixels look asymmetrical, as expected. Any ideas on how to make any
size image seem symmetrical when using the zoom feature?

The examples I've seen, such as David's contrastzoom, use normalized
data and changing image dimensions. I'm hoping to stay away from this
and keep my natural data coordinates.

Thanks
-Darrick
[Message index]
 
Read Message
Previous Topic: Efficient calculation of triangle surface areas
Next Topic: Re: Efficient calculation of triangle surface areas

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 12:57:29 PDT 2025

Total time taken to generate the page: 0.98857 seconds