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

Description:
    The _getcolor function returns the pixel value for the current color.
     This is the color used for displaying graphics output.  The default
    color value is one less than the maximum number of colors in the current
    video mode.

Returns:
    The _getcolor function returns the pixel value for the current color.

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

    main()
    {
        int col, old_col;

        _setvideomode( _VRES16COLOR );
        old_col = _getcolor();
        for( col = 0; col < 16; ++col ) {
            _setcolor( col );
            _rectangle( _GFILLINTERIOR, 100, 100, 540, 380 );
            getch();
        }
        _setcolor( old_col );
        _setvideomode( _DEFAULTMODE );
    }

Classification:
    PC Graphics

Systems:
    DOS, QNX

See Also:
    _setcolor

See Also: _setcolor

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