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 - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <graph.h>
    struct xycoord _FAR _getphyscoord( short x, short y );

Description:
    The _getphyscoord function returns the physical coordinates of the
    position with view coordinates (x,y).  View coordinates are defined by
    the  _setvieworg and  _setviewport functions.

Returns:
    The _getphyscoord function returns the physical coordinates, as an
    xycoord structure, of the given point.

Example:
    #include <conio.h>
    #include <graph.h>
    #include <stdlib.h>

    main()
    {
        struct xycoord pos;

        _setvideomode( _VRES16COLOR );
        _setvieworg( rand() % 640, rand() % 480 );
        pos = _getphyscoord( 0, 0 );
        _rectangle( _GBORDER, - pos.xcoord, - pos.ycoord,
                        639 - pos.xcoord, 479 - pos.ycoord );
        getch();
        _setvideomode( _DEFAULTMODE );
    }

Classification:
    PC Graphics

Systems:
    DOS, QNX

See Also:
    _getviewcoord, _setvieworg, _setviewport

See Also: _setvieworg _setviewport

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