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 _setvisualpage( short pagenum );

Description:
    The _setvisualpage function selects the page (in memory) from which
    graphics output is displayed.  The page to be selected is given by the
    pagenum argument.

    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 _setvisualpage function returns the number of the previous page when
    the visual page is set successfully; otherwise, a negative number is
    returned.

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:
    _getvisualpage, _setactivepage, _getactivepage, _getvideoconfig

See Also: _getvisualpage _setactivepage

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