Re: Zooming a pinboard layout
Hi
I am still having problems with zooming the drawing in my
pinboard-layout. I got a response from Eduardo Munoz which helps, but
does zooming centered at the origin which is not good enough.
I want the following:
1 - click at (x y)
2 - zoom the drawing using the layout as a viewport
with the following constraint
if (x1 y1) were the (x y) coordinates in the pre-zoomed drawing, (x2
y2) = (x y) must be the coordinates in the post-zoomed drawing.
Essentially I do the drawing by
(gp:with-graphics-translation (port viewport-x viewport-y)
(gp:with-graphics-scale (port zoomed-width zoomed-height)
;; draw))
But, I have not figured out how to reliably compute VIEWPORT-X and
VIEWPORT-Y.
I know this is basic CG stuff, but I am no good at this stuff.
I'd appreciate any help.
Thanks
Marco
On Aug 10, 2004, at 1:31 PM, Marco Antoniotti wrote:
> Hi
>
> I need help on CAPI and GP.
>
> I am writing a plotting application (which I plan to distribute) and I
> have all the basics in, but I'd like to add zooming (think Matlab) of
> the plot.
>
> I think I figured out how to do clipping by using a
> simple-pinboard-layout enclosing my graph, but zooming is escaping me.
> Should I just go ahead and draw everything of a pixmap and then copy
> out only the necessary area, or there is something magic about the
> transforms handling that is escaping me?
>
> Thanks fro your help, just answer in private if you do not feel to
> bother the whole list with this.
>
> Cheers
>
> marco
>
>
>
>
> --
> Marco Antoniotti http://bioinformatics.nyu.edu
> NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488
> 715 Broadway 10th FL fax. +1 - 212 - 998 3484
> New York, NY, 10003, U.S.A.
>
--
Marco Antoniotti http://bioinformatics.nyu.edu
NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488
715 Broadway 10th FL fax. +1 - 212 - 998 3484
New York, NY, 10003, U.S.A.