The text shape draws any text/string on the canvas at the position specified in the parameters.

The font used to render the text is the default one and cannot be changed at the moment. Like the text font, the size of the text is also a constant and cannot be changed.

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


To declare and draw a text shape named greeting with text "Hello" at position (100, 100) in color RED we write the following statement.

shape greeting(text):
  .text = "Hello"
  .color = RED
  .position = (100, 100)

Revine Shape Text


ParameterDescriptionPossible valuesDefaultRequired?
texttext to be drawnany text-Yes
positionthe position at which the text is to be drawnpoint-Yes
colorthe color of the textbuiltin colorsBLACKNo

Currently there is no way to change the font or the size.

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

Follow us on twitter @RevineLang

Built by Arpit Bhayani