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 _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.

See Also:
    _setcolor

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

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