1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-05 21:40:25 +00:00
QB64-PE/internal/help/LINE.txt

34 lines
1.4 KiB
Plaintext

The '''LINE''' statement is used in graphics [[SCREEN (statement)|SCREEN]] modes to create lines or boxes.
{{PageSyntax}}
: 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.
{{CodeStart}} '' ''
{{Cl|SCREEN}} 12
{{Cl|LINE}} (100, 100)-(300, 300), 10, , 63 'creates a styled line
{{Cl|LINE}} (100, 100)-(300, 300), 12, B , 255 'creates styled box shape
{{Cl|END}} '' ''
{{CodeEnd}}
''See also:''
* [[SCREEN (statement)|SCREEN]], [[COLOR]]
* [[DRAW]], [[CIRCLE]], [[STEP]]
* [[PSET]], [[PRESET]]
{{PageNavigation}}