DiGrande.it
Braille and Technologies for Visual Impairment

Constants

The tactile graphics language includes several system constants. Unlike other programming languages, constants are defined by the system and not by the programmer. Constants can be used as parameters or as operands.

Constants for the drawing area

- Width: actual width of the graphic, optionally modifiable using the "GraphicSize" instruction;

- Height: actual height of the graphic, optionally modifiable using the "GraphicSize" instruction;

- SysWidth: Actual print width of the tactile graphic set in the braille configurations;

- SysHeight: Actual print height of the tactile graphic set in the braille configurations;

- ScaleX: scale value for plotting graphics, modifiable using the GraphicScale or GraphicSize instruction;

- ScaleY: scale value for plotting graphics, modifiable using the GraphicScale or GraphicSize instruction;

- TransformX: horizontal transformation coefficient for graphics.

- TransformY: vertical transformation coefficient for graphics.

- OffsetX: offset value for plotting graphics, modifiable using the GraphicOffset instruction;

- OffsetY: offset value for plotting graphics, modifiable using the GraphicOffset instruction;

- OriginX: X coordinate for the rotation point of figures, modifiable using the GraphicOrigin instruction;

- OriginY: Y coordinate for the rotation point of figures, modifiable using the GraphicOrigin instruction;

Constants for turtle graphics

- TurtleX: horizontal position of the turtle.

- TurtleY: vertical position of the turtle.

- TurtleR: direction in sexagesimal degrees of the turtle.

Constants for characters

- FontName: current font name;

- FontSize: current font size;

- FontStyle: current font style;

- fsNormal: normal character;

- fsBold: bold character;

- fsItalic: italic character;

- fsUnderline: underlined character;

- fsStrikeOut: strikethrough character.

Constants for text position

- hsTopLeft: top-left starting point;

- hsTopCenter: top-center starting point;

- hsTopRight: top-right starting point;

- hsMidLeft: mid-left starting point;

- hsMidCenter: mid-center starting point;

- hsMidRight: mid-right starting point;

- hsBotLeft: bottom-left starting point;

- hsBotCenter: bottom-center starting point;

- hsBotRight: bottom-right starting point.

Constants for colors

- ColorBrush: brush color;

- ColorPen: pen color.

- ClBlack: black color. RGB Value #000000;

- ClDkGray: dark gray color. RGB Value #404040;

- ClGray: gray color. RGB Value #808080;

- ClLtGray: light gray color. RGB Value #C0C0C0;

- ClWhite: white color. RGB Value #FFFFFF;

- ClMaroon: maroon color. RGB Value #800000;

- ClOlive: olive green color. RGB Value #808000;

- ClGreen: green color. RGB Value #008000;

- ClTeal: teal color. RGB Value #008080;

- ClNavy: navy blue color. RGB Value #000080;

- ClPurple: purple color. RGB Value #800080;

- ClRed: red color. RGB Value #FF0000;

- ClYellow: yellow color. RGB Value #FFFF00;

- ClLime: lime green color. RGB Value #00FF00;

- ClAqua: aqua color. RGB Value #00FFFF;

- ClBlue: blue color. RGB Value #0000FF;

- ClFuchsia: fuchsia color. RGB Value #FF00FF.

Other constants

- Design: Boolean constant that returns True if the graphic is executed in a tactile graphics environment, False otherwise (for example, in tactile graphics inserted in documents);

- Null: constant that returns a null value, useful for canceling the value of some instructions.

- True: Boolean truth condition;

- False: Boolean falsity condition.

- Pi: Pi constant equivalent to 3.14 (approx.).

For example, this instruction draws a circle at the center of the sheet, using constants.

- Circle(width/2, height/2, 30)

Or this code draws a circle only if executed in the graphic environment:

- If Design

- Circle(50,50,40)

- EndIf

Constant names cannot be reused as variable names.