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 _wxycoord _FAR _getwindowcoord( short x, short y );

Description:
    The _getwindowcoord function returns the window coordinates of the
    position with view coordinates (x,y).  Window coordinates are defined by
    the  _setwindow function.

Returns:
    The _getwindowcoord function returns the window coordinates, as a
    _wxycoord structure, of the given point.

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

    main()
    {
        struct xycoord centre;
        struct _wxycoord pos1, pos2;

        /* draw a box 50 pixels square */
        /* in the middle of the screen */
        _setvideomode( _MAXRESMODE );
        centre = _getviewcoord_w( 0.5, 0.5 );
        pos1 = _getwindowcoord( centre.xcoord - 25,
                                centre.ycoord - 25 );
        pos2 = _getwindowcoord( centre.xcoord + 25,
                                centre.ycoord + 25 );
        _rectangle_wxy( _GBORDER, &pos1, &pos2 );
        getch();
        _setvideomode( _DEFAULTMODE );
    }

Classification:
    PC Graphics

Systems:
    DOS, QNX

See Also:
    _setwindow, _getviewcoord

See Also: _setwindow

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