Re: Zoom relative to mouse position



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
.



Relevant Pages

  • Re: Rotating an object about several axis. confused
    ... applying the net transform below to an object will ... if the object is a tall rectangle, a flat face will still be facing ... the original X-axis, but an edge will now be facing upwards. ... object class instantiations reference these. ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: Draw a scaled arrow
    ... I am already using a transform to scale and translate the image when it ... In the example below, each arrow is rotated about its tip, then scaled, ... home dot woh dot rr dot com slash jbmatthews ...
    (comp.lang.java.programmer)
  • Re: ifs image width and height
    ... Is there some way to predict the width and height of an IFS attractor? ... My programs generating IFS images always make some iterations to store ... Sometimes you can find an extremum by repeatedly tranforming using one transform, but this doesn't necessarily work when rotations and reflections are involved. ... Transform the four corners of this rectangle with each transform, and find the smallest rectangle which includes all the points so obtained. ...
    (sci.fractals)
  • Re: Ruby in Lisp
    ... I think that the idea of using the dot for eliminating parenthesis ... Detect that a function has only 1 argument, then transform ... You'd have to write a parser for your syntax and generate a sexp to be ...
    (comp.lang.lisp)
  • Re: Finding End Points for a skewed/rotated Ellipse drawn with GraphicsPath
    ... right endpoints happen to fall in the middle of the the rectangle on the ... In fact, if I read the points out of the GraphicsPath, ... whatever formula to determine how the ellipse will look. ... And then comment out the transform, ...
    (microsoft.public.dotnet.framework.drawing)