_getviewcoord Functions

Description

Translate coordinates to view coordinates.

#include <graph.h>

struct _xycoord __far _getviewcoord( short x, short y );

struct _xycoord __far _getviewcoord_w( double wx, double wy );

struct _xycoord __far _getviewcoord_wxy( struct _wxycoord
__far *pwxy1 );

x, y Physical point to translate  
wx, wy Window point to translate  
pwxy1 Window point to translate  

Remarks

The _getviewcoord routines translate the specified coordinates (x, y) from one coordinate system to view coordinates and then return them in an _xycoord structure, defined in GRAPH.H. The _xycoord structure contains the following elements:

Element Description

short xcoord x coordinate
short ycoord y coordinate

The various _getviewcoord routines translate in the following manner:

Routine Translation

_getviewcoord Physical coordinates (x, y) to view coordinates
_getviewcoord_w Window coordinates (wx, wy) to view coordinates
_getviewcoord_wxy Window coordinates structure (pwxy1) to view coordinates

In Microsoft C version 5.1, the function _getviewcoord was called _getlogcoord.

Return Value

The _getviewcoord function returns the coordinates as noted above. There is no error return.

Compatibility

Standards:None

16-Bit:DOS

32-Bit:None

See Also

_getphyscoord, _getwindowcoord, _grstatus

Example

See the example for _setwindow.