User Tools

Site Tools


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


ugBASIC User Manual

POLYLINE ✓

SYNTAX

   POLYLINE { [x1] },{ [y1] } TO { [x2] },{ [x2] } { TO ... },{ [c] }
   POLYLINE { [x1] },{ [y1] } TO { [x2] },{ [x2] } { TO ... }
   POLYLINE TO { [x2] },{ [x2] } { TO ... },{ [c] }
   POLYLINE TO { [x2] },{ [x2] } { TO ... }

PURPOSE

This instruction draws a polyline, that is a line formed by multiple lines, on the screen, starting from the coordinates (x1, y1) to arrive at the coordinates (xn, yn), using the color c. The start can be omitted: in this case, ugBASIC will draw starting from the last drawn position. If the color is omitted, the last color selected with the INK or PEN command will be used. Finally, the default line style is full but a 16 bit bitmask can be set with the SET LINE command.

EXAMPLE

  POLYLINE 10,10 TO 20,20 TO 20,30 TO 20,10, WHITE

See also the following example files:

ABBREVIATION

 Ply

AVAILABLE ON

  • Commodore 64
  • ZX Spectrum 48K
  • Commodore PLUS/4
  • Atari (400/800/XL)
  • Dragon 32
  • Dragon 64
  • PC128 Olivetti Prodest
  • Thomson MO5
  • Commodore VIC-20
  • MSX 1
  • ColecoVision
  • SEGA SC-3000
  • SEGA SG-1000

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