Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 120 - 2505_CoreGPT(Podar)_Flipbook_C7
P. 120

    RECTANGLE Statement

                      The RECTANGLE (or RECT) statement is used to draw a rectangle in the graphics window.

                      Syntax:

                      RECT x, y, width, height
                          ✶  x, y: Coordinates of the top-left corner of the rectangle.
                          ✶  width: The width of the rectangle.

                          ✶  height: The height of the rectangle.

                      Program 9: To draw a rectangle.

                      Program 10: To draw a coloured rectangle.

                      This program demonstrates how to draw a coloured rectangle.

                    118     Premium Edition-VII

| 115 116 117 118 119 120 121 122 123 124 125 |