Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Viewport definition.

This topic is 5454 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a question about the definition of a viewport. I'm working with MFC right now (I know, I know ) and I've come to a section which is talking about different GDI mapping modes. It's describing the relationships between logical units and device units. Here's part of what's being said: "To specify the ratio between logical units and device units, you must describe two rectangles that specify the relative dimensions of the logical space (the window) and the device space (the viewport)." What exactly a viewport is, has been bugging me for a while. Google came up with the following definition: "For View objects, the viewport is a rectangular subregion of NDC space that specifies where the View object will be placed when drawn. The precise meaning of the viewport depends on the View object. For example, for XyPlot objects, the viewport specifies where the grid containing the curves will be placed, and the labeling (if any) will be drawn outside of the viewport. On the other hand, for TextItem objects, the viewport will be a rectangle surrounding the text string." Basically, my question is, is a viewport a device context? So like, you could have a printer viewport? I think that's right, except that it's represented in device units and not logical units, but I could do with a solid answer to stop it rushing around my mind. A plain English definition would be great (suffering from information overload atm). Thanks in advance, -hellz Edit: There's no definition in the Game Dictionary, in case anyone was wondering. [edited by - hellz on November 13, 2003 11:56:04 AM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!