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>
    short _FAR _getplotaction( void );

Description:
    The _getplotaction function returns the current plotting action.

    The drawing functions cause pixels to be set with a pixel value.  By
    default, the value to be set is obtained by replacing the original pixel
    value with the supplied pixel value.  Alternatively, the replaced value
    may be computed as a function of the original and the supplied pixel
    values.

    The plotting action can have one of the following values:

    _GPSET
        replace the original screen pixel value with the supplied pixel
        value

    _GAND
        replace the original screen pixel value with the bitwise and of the
        original pixel value and the supplied pixel value

    _GOR
        replace the original screen pixel value with the bitwise or of the
        original pixel value and the supplied pixel value

    _GXOR
        replace the original screen pixel value with the bitwise
        exclusive-or of the original pixel value and the supplied pixel
        value.  Performing this operation twice will restore the original
        screen contents, providing an efficient method to produce animated
        effects.


Returns:
    The _getplotaction function returns the current plotting action.

See Also:
    _setplotaction

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

    main()
    {
        int old_act;

        _setvideomode( _VRES16COLOR );
        old_act = _getplotaction();
        _setplotaction( _GPSET );
        _rectangle( _GFILLINTERIOR, 100, 100, 540, 380 );
        getch();
        _setplotaction( _GXOR );
        _rectangle( _GFILLINTERIOR, 100, 100, 540, 380 );
        getch();
        _setplotaction( old_act );
        _setvideomode( _DEFAULTMODE );
    }

Classification:
    PC Graphics

Systems:
    DOS, QNX

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