[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Zooming in Object Graphics





David Fanning wrote:

> 
> 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!?
> 

I don't think so... the data should fit within the viewing rectangle and
have a nice border around it.

I wish that I could speak with more authority on the issue (eshpeciilay
the igg-nog).  I think I have to see it stepwise to see it.

If Kellie had an original xrange of [0,100] and wanted to zoom into
xrange = [50,75]...

>oView->SetProperty, ViewPlane_Rect = [xMin-0.2*xSpan, yMin-0.2*ySpan,
xSpan*1.4, ySpan*1.4]

ViewPlane_Rect = [50-0.2*25, yMin-0.2*ySpan, 25*1.4, ySpan*1.4]
ViewPlane_Rect = [45       , yMin-0.2*ySpan, 35    , ySpan*1.4]

oView->SetProperty, ViewPlane_Rect = [45       , yMin-0.2*ySpan, 35    , ySpan*1.4]
oGrAtom->SetProperty, xRange = [50,75], yRange = [yMin,yMax]

oXaxis->Location = [50,yMin,0], Range = [50,75]

oYaxis->Location = [50,yMin,0], Range = [yMin,yMax]


So I would keep track of in normalized values is the *location* of the
graphics atoms relative to the viewplane.  The viewplane would then flex
to maintain that same relative location for the graphics atoms.
 
In normalized terms, the data occupies 0.71 of the viewport (1.0/1.4) of
the viewplane in the x direction.  The left and right borders occupy
0.14 of the view plane each.

I'll have to write a routine to test it out (just as long as it works on
my monochrome display - I'm giving up on color!)

Ben

-- 
Ben Tupper
Bigelow Laboratory for Ocean Sciences
180 McKown Point Rd.
W. Boothbay Harbor, ME 04575
btupper@bigelow.org