User Tools

Site Tools


ugbasic:user:kw:rec
Translations of this page:


ugBASIC User Manual

REC ✓

SYNTAX

   REC x, y, sa, sb, fq

PURPOSE

REC draws a rectangle. The location of the top left corner is determined by the first two parameters x and y, the width and height of the rectangle by parameters three and four (sa and sb). The color of the edge lines is determined by the last parameter (fq, color source). The four corners of the rectangle are always drawn.

Permissible values ​​are 0..SCREEN WIDTH for x and sa. For y or sb, values ​​from 0 to SCREEN HEIGHT are permitted in both cases. The color also depends on the graphics mode and refers to the color specifications behind HIRES on the one hand and MULTI and LOW COL on the other. The point 0,0 is in the top left corner.

Note: If the edge lengths of the rectangle exceed the screen limits, rectangle will be clipped.

EXAMPLE

  REC x, y, 29, 19, 1

See also the following example files:

ABBREVIATION

 Rc

AVAILABLE ON

  • Commodore 128 (MOS 8502)

ANY PROBLEM?

If you have encountered a problem using this command, if you think there is a bug or the explanation is unclear, please open an issue for this keyword on GitHub. Thank you!

POWERED BY