Lines, Rectangles, and Fills
|Top Previous Next|
The lcd.line method draws a line between any points. Lcd.verline and lcd.horline draw vertical and horizontal lines correspondingly. Use the last two methods whenever possible because they work faster than generic lcd.line. The line is drawn using the color set in the lcd.forecolor property (see Working With Pixels/Lines), and the line width is defined by the lcd.linewidth property. In the following example, we draw a picture as shown above, on the left:
Defining lcd.linewidth>1 (3 for one of the lines in the above example) creates "fatter" lines. Notice how two points of the line are drawn and where each specified coordinate actually is.
Lcd.rectangle draws an unfilled rectangle using lcd.forecolor as "pen" color, and pen width defined by the lcd.linewidth property. Lcd.filledrectangle will additionally paint the internal area using lcd.backcolor. Example and its result:
Lcd.fill paints specified area with the lcd.forecolor: