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 xycoord _FAR _getcurrentposition( void );

    struct _wxycoord _FAR _getcurrentposition_w( void );

Description:
    The _getcurrentposition functions return the current output position for
    graphics.  The _getcurrentposition function returns the point in view
    coordinates.  The _getcurrentposition_w function returns the point in
    window coordinates.

    The current position defaults to the origin, (0,0), when a new video
    mode is selected.  It is changed by successful calls to the  _arc,
     _moveto and  _lineto functions as well as the  _setviewport function.

    Note that the output position for graphics output differs from that for
    text output.  The output position for text output can be set by use of
    the  _settextposition function.

Returns:
    The _getcurrentposition functions return the current output position for
    graphics.

See Also:
    _moveto, _moveto_w, _settextposition

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

    main()
    {
        struct xycoord old_pos;

        _setvideomode( _VRES16COLOR );
        old_pos = _getcurrentposition();
        _moveto( 100, 100 );
        _lineto( 540, 100 );
        _lineto( 320, 380 );
        _lineto( 100, 100 );
        _moveto( old_pos.xcoord, old_pos.ycoord );
        getch();
        _setvideomode( _DEFAULTMODE );
    }

Classification:
    PC Graphics

Systems:
     _getcurrentposition - DOS, QNX

    _getcurrentposition_w - DOS, QNX

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