LINE - QB64 Wiki

LINE

From QB64 Wiki

Jump to: navigation, search

The LINE statement is used in graphics SCREEN modes to create lines or boxes.


Syntax:

LINE [STEP](column1, row1)-[STEP](column2, row2), color%[, [{B|BF}]][, style%]


  • Can use STEP keyword for graphics coordinates relative to a previously placed objects.
  • Creates a colored line from coordinate1 to coordinate2 if the box options(B or BF) are omitted. Can be drawn partially offscreen.
  • Creates a colored box outline if the B option is used.
  • Creates a color filled box if the BF option is used.
  • Style is any INTEGER value from 0 to 32767. It creates dashed lines or box outlines. The Box comma is required with style even when not creating a box. The lines are created where the style value's bits are on. BF cannot be used with style.
  • LINE can be used in any graphic screen mode, but cannot be used in the default screen mode 0 as it is text only!


Example: Creating styled lines and boxes with the LINE statement. Different style values create different dashed line spacing.

SCREEN 12 LINE (100, 100)-(300, 300), 10, , 63 'creates a styled line LINE (100, 100)-(300, 300), 12, B , 255 'creates styled box shape END


See also:



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page