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>rectangle() draw a rectangle</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 rectangle()             Draw a Rectangle

 #include   <graphics.h>

 void far   rectangle(l,t,r,b);
 int        l;
 int        t;
 int        r;
 int        b;

    rectangle() draws a rectangle at the given coordinates, 'l' left, 't'
    top, 'r' right, and 'b' bottom.  The rectangle is drawn using the
    current color, line style and thickness.

    Returns:    Nothing.

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

    The following statements put two rectangle on the screen.

           #include <graphics.h>
           #include <conio.h>

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

               initgraph(&gdriver,&gmode,"");
               rectangle(100,50,300,100);
               rectangle(200,25,400,75);
               getch();
               closegraph();
           }



See Also: bar() getlinesettings() getcolor()

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