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 _getvisualpage( void );

Description:
    The _getvisualpage function returns the number of the currently selected
    visual graphics page.

    Only some combinations of video modes and hardware allow multiple pages
    of graphics to exist.  When multiple pages are supported, the active
    page may differ from the visual page.  The graphics information in the
    visual page determines what is displayed upon the screen.  Animation may
    be accomplished by alternating the visual page.  A graphics page can be
    constructed without affecting the screen by setting the active page to
    be different than the visual page.

    The number of available video pages can be determined by using the
     _getvideoconfig function.  The default video page is 0.

Returns:
    The _getvisualpage function returns the number of the currently selected
    visual graphics page.

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

    main()
    {
        int old_apage;
        int old_vpage;

        _setvideomode( _HRES16COLOR );
        old_apage = _getactivepage();
        old_vpage = _getvisualpage();
        /* draw an ellipse on page 0 */
        _setactivepage( 0 );
        _setvisualpage( 0 );
        _ellipse( _GFILLINTERIOR, 100, 50, 540, 150 );
        /* draw a rectangle on page 1 */
        _setactivepage( 1 );
        _rectangle( _GFILLINTERIOR, 100, 50, 540, 150 );
        getch();
        /* display page 1 */
        _setvisualpage( 1 );
        getch();
        _setactivepage( old_apage );
        _setvisualpage( old_vpage );
        _setvideomode( _DEFAULTMODE );
    }

Classification:
    PC Graphics

Systems:
    DOS, QNX
See Also:
    _setvisualpage, _setactivepage, _getactivepage, _getvideoconfig

See Also: _setvisualpage _setactivepage

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