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/C++ v10.0 : C library - <b>synopsis:</b> 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.

See Also:
    _setwindow, _getviewcoord, _getviewcoord_w, _getviewcoord_wxy

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

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