Supported Browsers Home   
MGL_getViewportDC Previous   
MGL_getViewportOrgDC Next   
External Functions Up   

MGL_getViewportOrg

Returns the current viewport origin.

Declaration

void MGLAPI MGL_getViewportOrg(
    point_t *org)

Prototype In

mgraph.h

Parameters

org

Place to store the viewport origin

 

Description

This function returns a copy of the currently active viewport origin. When a new viewport is set with the MGL_setViewport function, the viewport origin is reset to (0,0), which means that any primitives drawn at pixel location (0,0) will appear at the top left hand corner of the viewport.

You can change the logical coordinate of the viewport origin to any value you please, which will effectively offset all drawing within the currently active viewport. Hence if you set the viewport origin to (10,10), drawing a pixel at (10,10) would make it appear at the top left hand corner of the viewport.

See Also

MGL_getViewportOrgDC, MGL_setViewport, MGL_setViewportOrg

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com