Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - these functions deal with coordinate systems and mapping coordinates from http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
These functions deal with coordinate systems and mapping coordinates from
one system to another.  The Watcom C Graphics Library supports three
coordinate systems:

 1. Physical coordinates

 2. View coordinates

 3. Window coordinates

Physical coordinates match the physical dimensions of the screen.  The
physical origin, denoted (0,0), is located at the top left corner of the
screen.  A pixel to the right of the origin has a positive x-coordinate and
a pixel below the origin will have a positive y-coordinate.  The x- and
y-coordinates will never be negative values.

The view coordinate system can be defined upon the physical coordinate
system by moving the origin from the top left corner of the screen to any
physical coordinate (see the  _setvieworg function).  In the view coordinate
system, negative x- and y-coordinates are allowed.  The scale of the view
and physical coordinate systems is identical (both are in terms of pixels).

The window coordinate system is defined in terms of a range of
user-specified values (see the  _setwindow function).  These values are
scaled to map onto the physical coordinates of the screen.  This allows for
consistent pictures regardless of the resolution (number of pixels) of the
screen.

The following functions are defined:

_getcliprgn
    get the boundary of the current clipping region

_getphyscoord
    get the physical coordinates of a point in view coordinates

_getviewcoord
    get the view coordinates of a point in physical coordinates

_getviewcoord_w (see _getviewcoord)
    get the view coordinates of a point in window coordinates

_getviewcoord_wxy (see _getviewcoord)
    get the view coordinates of a point in window coordinates

_getwindowcoord
    get the window coordinates of a point in view coordinates

_setcliprgn
    set the boundary of the clipping region

_setvieworg
    set the position to be used as the origin of the view coordinate system

_setviewport
    set the boundary of the clipping region and the origin of the view
    coordinate system

_setwindow
    define the boundary of the window coordinate system

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson