The line shape draws a line between two points on the canvas. You can optionally specify the color to be used while drawling the line.

To understand how to declare and draw a shape please refer, to this document.


To declare and draw a LINE shape named TheBigRedLine between the points (100, 100) and (200, 200) in color Red we write the following statement.

shape TheBigRedLine(line):
  .point1 = (100, 100)
  .point2 = (200, 200)
  .thickness = 2
  .color = RED

Revine Shape Line


ParameterDescriptionPossible valuesDefaultRequired?
point1starting point of the linepoint-Yes
point2ending point of the linepoint-Yes
thicknessthe thickness of the line1 to 1002No
colorthe color of the linebuiltin colorsBLACKNo

Notice any errors or typos? Please let us know or feel free to edit and issue a pull request.

Follow us on twitter @RevineLang

Built by Arpit Bhayani