New utility: The Viewport Explorer



I was recently reviewing some material in which I believed the description of the
coordinate transformations was erroneous. The author insisted that the material was
absolutely correct. To demonstrate the error, I wrote a little program that showed exactly
what was happening. It was a useful little program, so I enhanced it a bit and it is now
available for everyone. What it allows you to do is experiment with SetWindowOrg,
SetViewportOrg, SetWindowExt, SetViewportExt, and mapping modes, and explore the effects
of this on a displayed image. It also illustrates how to do logical to device coordinate
mappings, how to do dragging using logical coordinates, and other useful tricks. Enjoy.

http://www.flounder.com/viewport.htm
joe
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: New utility: The Viewport Explorer
    ... origins, extents, and mapping modes have always been a source of confusion for me. ... > SetViewportOrg, SetWindowExt, SetViewportExt, and mapping modes, and explore the effects ... > mappings, how to do dragging using logical coordinates, and other useful tricks. ... > MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)
  • Re: Zooming the images in runtime
    ... Perhaps the simplest one is to use mapping modes, ... because StretchBlt can often produce some really weird effects. ... found on my MVP Tips site. ...
    (microsoft.public.vc.mfc)
  • Re: setting font size to decimal number
    ... You could use mapping modes, which have the property that the to-pixel mapping is handled ... >nice to put those to work to specify sub-pixel font sizes. ... MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)