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

Home » Public Forums » archive » Re: Zooming in 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
Re: Zooming in Object Graphics [message #22979 is a reply to message #22976] Wed, 20 December 2000 10:23 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Ben Tupper (btupper@bigelow.org) writes:

> I don't want to open a can of worms, but...
>
> This topic always reminds me of Randall Frank's recommendation to use
> natural data coordinates rather than normalized data coordinates. I have
> only done the graphics in natural coordinates a couple of times, so I'm
> skating on thin ice with wobbly ankles. Zooming seems like a place where
> it might be especially useful; of course, it's just a hunch and I've yet
> to try it.
>
> The ViewPlane_Rect would have to change as well as the location of the
> axes/annotations (unless you didn't care to see them when zooming, kind
> of like zooming on a bitmap.) The data ranges can be controlled by the
> [XYZ]RANGE keywords. The tricky part is setting up the ViewPlane_Rect
> so there will be enough room for the axes, etc. I know I build in the
> border when making object graphics in normalized coordinates
> (ViewPlane_Rect = [-.2,-.2, 1.4,1.4] or some such thing.) In natural
> coordinates maybe the following could be done:
>
> xMin = Min(ZoomedDataX, Max = xMax)
> yMin = Min(ZoomedDataY, Max = yMax)
>
> xSpan = xMax-xMin
> ySpan = yMax-yMin
>
> oView->SetProperty, ViewPlane_Rect = [xMin-0.2*xSpan, yMin-0.2*ySpan,
> xSpan*1.4, ySpan*1.4]
>
> oGrAtom->SetProperty, xRange = [xMin,yMin], yRange = [yMin,yMax]
>
> oXaxis->Location = [xMin,yMin,0], Range = [xMin,xMax]
>
> oYaxis->Location = [xMin,yMin,0], Range = [yMin,yMax]
>
>
> Well, it's the holiday season, perhaps I'm having visions of sugared plums...

I don't know. Maybe with a couple more egg-nogs I could
see it, but I don't understand how this will *zoom* anything.
If you change *both* the viewport rectangle *and* the axes
endpoints, aren't you just back to where you started!?

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Polygon hull
Next Topic: New book on Calling C from IDL

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

Current Time: Fri Oct 10 09:13:10 PDT 2025

Total time taken to generate the page: 0.88173 seconds