🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #581

Re: Selecting A Zoom Region

#581
From: Huaiqing Wang
Date: Thu, 03 Sep 1992 12:45
42 lines
1890 bytes
In article <9209030207.AA06956@sparc0.brc.uconn.edu> sriram@brc.uconn.edu (Chittathoor M. Sriram) writes:
>
>Hi,
>	I have an application which has a Page filled with Glyphs.
>
>	What I want to do is select a Portion of the Page for 
>	zooming.  
>
>	Presently I am drawing a rectangle with every motion 
>	event to get a simulation of the RubberRect. That is 
>	I redraw the entire page and then the Rectangle with the new
>	dimensions. It sound like a inefficient way but I cannot
>	think of any  other way to accomplish this in IV 3.0.
>
>	Is there any better method ?
>
>	Highly appreciate any pointers.
>
>
>Sriram

Hi, this is actually "chen@ie.toronto.edu", I am the guy who modified
the Scrollable Glyph.

I did something like Sriram have in mind in my
project. Basically, I used a XYMarker as the background Glyph and then
from the ratio of the Selected Rectangle to the current Width and Height
for the zooming factor (I call them "magnification").

Obviously first of all, put Your Glyph into Scrollable first. Then, use
<Scrollable instance name>->do_mag(<new maginification>) to zoom in
and then <Scrollable instance name>->scroll_to(coord_x, coord_y).

Scrollable is very expensive since it uses TransformSetter all the time.
but I guess for Zooming that is the best you can do. :)

	-- Chen Wang

Ps: A newer version of Scrollable will be released and with the caution from
    my prof., a proper Copyright sign somewhere. ;)
.
 
Technical Details
Message-ID: <92Sep3.084534edt.9074@rock.db.toronto.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!rpi!utcsri!rock.db.toronto.edu!wang
References: <9209030207.AA06956@sparc0.brc.uconn.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!rpi!utcsri!rock.db.toronto.edu!wang
Newsgroups: comp.windows.interviews
From: wang@db.toronto.edu (Huaiqing Wang)
Subject: Re: Selecting A Zoom Region
Message-ID: <92Sep3.084534edt.9074@rock.db.toronto.edu>
Organization: Department of Computer Science, University of Toronto
References: <9209030207.AA06956@sparc0.brc.uconn.edu>
Date: 3 Sep 92 12:45:47 GMT
Lines: 42