Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>setwritemode() set write mode for line drawing</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 setwritemode()          Set Write Mode for Line Drawing

 #include   <graphics.h>

 void far setwritemode(mode);
 int mode;               Mode to set

        This function sets the writing mode for line drawing. If mode is 0,
        lines overwrite the screen's current contents. On the other hand,
        If mode is 1, an exclusive OR (XOR) is done.

    Returns:    Nothing.

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

        The following statements select the XOR method of drawing a line,
        and draw a line from (0, 0) to (100, 100).

     #include <graphics.h>
     #include <stdlib.h>

     int main()
     {
        int gdriver = DETECT, gmode;

        initgraph(&gdriver, &gmode, "");

        setwritemode(XOR_PUT);

        line(0, 0, 100, 100);
        getch();

        getch();
        closegraph();
        return 0;
     }

See Also: linerel() putimage() line() lineto()

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