Docs Blog Get-it

R3 View - Graphics Draw Dialect

R3 Graphical User Interface (GUI)


The draw dialect is a REBOL sub-language for describing scalar vector graphics (SVG).

The dialect consists of a number of command keywords, as listed in this document below.

Each command can be followed by its arguments, all of which are optional. Their names, datatypes, and descriptions are provided in the "argument" table for each command section below.

Command Arguments

If an argument is not provided, it's default value will be used. In general, most commands will do something useful even if no arguments are provided. This is the "default simple" principle. In cases where a size is required, the approximate area size of the gob will be used. For example, if you draw a box and provide no arguments, the box will be made the size of the GOB.

When command arguments are provided they are matched by datatype and then by position. For example, if a command accepts a string and two pair values, if only a pair value is provided, it will be assigned to the first pair argument. The string and the second pair will get their default values.

This optional argument method also allows arguments of different datatypes to be written in a different order. In the example above, if the actual arguments were specified as a pair followed by a string, that would work as well. This relieves the programmer of needing to remember the precise order of all arguments.

Dialect Specification

The draw dialect is currently implemented with the delect method of dialect definitions. The dialect is defined by the object found at system/dialects/draw. In this definition, the command words are set to blocks that specify their arguments. Words that are set to none are keyword arguments, not commands.

It is not recommended for programs modify the system/dialects/draw object unless the modification is intended to affect all code (globally) that calls the draw dialect.


Setup, Attributes, Matrix

R3 Draw - Setup and Attribute Commands describes draw commands related to special attributes, matrix setup and various transformations.

Lines and Segments

R3 Draw - Line Related Commands describes draw commands that are related to lines, line segments, vertices, polygons and basic shapes.

Curves and Arcs

R3 Draw - Curve Related Commands describes draw commands that are related to curves, arcs, circles, and ellipses.

Custom Shapes

R3 Draw - Shape Sub-Commands Describes special commands optimized for describing shapes. All of these commands are used withing the shape argument block and should not be used separately.

Error Processing

describe how errors are shown

About | Contact | PrivacyREBOL Technologies 2021