Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C 6.0 - <b>_setwritemode() set logical graphics write mode</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _setwritemode()         Set logical graphics write mode

 #include   <graph.h>

 short _setwritemode(action);
 short action           _GAND, _GOR, _GPRESET, _GPSET, or _GXOR.

    _setwritemode() sets the logical graphics write mode for such
    functions as _lineto(), _rectangle(), and _polygon(). The
    possibilities for the write mode are these:

              _GAND  _GOR  _GPRESET  _GPSET  _GXOR

    Returns:    previous write mode if successful; -1 otherwise.

   Portability:     MS-DOS only, true MDPA, CGA, EGA, MCGA, or VGA video
                    compatibles

   -------------------------------- Example ---------------------------------

     This program sets the write mode to PSET.

    #include <conio.h>
    #include <stdlib.h>
    #include <graph.h>
    #include <stdlib.h>

    void main()
    {
        struct xycoord rver[3];
        _setvideomode(_MAXCOLORMODE);
        _setwritemode(_GPSET);

        rver[0].xcoord = 10;
        rver[0].ycoord = 10;
        rver[1].xcoord = 10;
        rver[1].ycoord = 50;
        rver[2].xcoord = 50;
        rver[2].ycoord = 50;
        _polygon(_GBORDER, rver, 3);

        getch();
        _setvideomode(_DEFAULTMODE);
    }

See Also: _getwritemode() _lineto() _setcolor() _setlinestyle()

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