Re: Zoom relative to mouse position
- From: "John B. Matthews" <nospam@xxxxxxxxxx>
- Date: Tue, 20 May 2008 18:40:00 -0400
In article <nospam-466FBD.16342420052008@xxxxxxxxxxxxxxxxxxxxxx>,
"John B. Matthews" <nospam@xxxxxxxxxx> wrote:
[...]
Correct. The rectangle starts out centered on the origin of a Cartesian[...]
plane (user space). As the graphics environment's default transformation
matrix is unchanged, the rectangle is rendered upright on the screen
(device space) and centered on the origin (left, upper corner).
Translating it to the current mouse point leaves it centered on the
mouse point, scaled according to the mouse wheel. Try altering the
original rectangle from (-15, -30, 30, 60) to (-15, -5, 30, 60) to see
how the rectangle remains upright (due to the g2's default transform)
and how it is positioned (due to the tx transform).
Oops, not Cartesian. Rather, it's the vertical inverse, with ordinates
increasing top-to-bottom.
John
--
John B. Matthews
trashgod at gmail dot com
home dot woh dot rr dot com slash jbmatthews
.
- References:
- Zoom relative to mouse position
- From: Amir Kouchekinia
- Re: Zoom relative to mouse position
- From: John B. Matthews
- Re: Zoom relative to mouse position
- From: Amir Kouchekinia
- Re: Zoom relative to mouse position
- From: John B. Matthews
- Zoom relative to mouse position
- Prev by Date: Re: Java ready for number crunching?
- Next by Date: Re: Seeking a simple java code generator for database CRUD web applications
- Previous by thread: Re: Zoom relative to mouse position
- Next by thread: Re: Zoom relative to mouse position
- Index(es):
Relevant Pages
|