The constants
There are some system constants in the tactile graphics language. Unlike other programming languages, constants are defined by the system and not by the
programmer. The constants can be used as parameters or operands.
Constants for the drawing area
- Width: real width of the graph, possibly modifiable using the "GraphicSize" instruction;
- Height: real height of the graph, possibly modifiable using the "GraphicSize" instruction;
- ScaleX: scale value for drawing charts, which can be modified using the
GraphicScale or GraphicSize statement;
- ScaleY: scale value for drawing charts, which can be modified using the GraphicScale or GraphicSize statement;
- OffsetX: value of the movement of the plotting of the graphs, modifiable using the GraphicOffset instruction;
- OffsetY: value of the movement of the plotting of the graphs, modifiable using the GraphicOffset instruction;
- SysWidth: Real width of the tactile graph set in the Braille settings;
- SysHeight: Real height of the tactile graph set in the Braille settings;
- ColorBrush: brush color;
- ColorPen: pen color.
Constants for boolean types
- True: Boolean condition of truth;
- False: Boolean condition of false.
Constants for mathematics
- Pi: Greek Pi constant equivalent to 3.14 (approximately).
Constants for the style of the fonts
- fsNormal: normal font;
- fsBold: bold font;
- fsItalic: italic font;
- fsUnderline: underlined font;
- fsStrikeOut: barred font.
Constants for the position of the text
- hsTopLeft: Start point in the top left corner;
- hsTopCenter: Start point at the top center;
- hsTopRight: Start point in the upper right corner;
- hsMidLeft: Start point in the middle on the left;
- hsMidCenter: Start point in the middle of the center;
- hsMidRight: Start point in the middle on the right;
- hsBotLeft: Start point in the bottom left corner;
- hsBotCenter: Start point at the bottom center;
- hsBotRight: Start point in the bottom right corner.
Constants for colours
- ClBlack: black colour. RGB value #0000;
- ClDkGray: Dark grey colour. RGB value #404040;
- ClGray: grey colour. RGB value #808080;
- ClLtGray: light grey colour. RGB value #C0C0C0;
- ClWhite: white colour. RGB value #FFFFFF;
- ClMaroon: burgundy color. RGB value #800000;
- ClOlive: olive green colour. RGB value #808000;
- ClGreen: green colour. RGB value #008000;
- ClTeal: water green colour. RGB value #008080;
- ClNavy: dark blue color. RGB value #0080;
- ClPurple: purple color. RGB value #800080;
- ClRed: red color. RGB value #FF0000;
- ClYellow: yellow color. RGB value #FFFF00;
- ClLime: lemon green colour. RGB value #00FF00;
- ClAqua: light blue colour. RGB value #00FFFF;
- ClBlue: blue colour. RGB value #0000FF;
- ClFuchsia: fuchsia colour. RGB value #FF00FF.
Other constants
- Design: Boolean constant that returns True if the graph is executed in a tactile graphics environment, False otherwise (for example in tactile graphs inserted in documents).
For example, this instruction draws a circle in the center of the sheet using constants.
- Circle(width/2, height/2, 30)
This code draws a circle only when executed in the graphical environment:
- If Design
- Circle(50,50,40)
- EndIf
Constant names cannot be reused as variable names.