Drawing Statement
Draw one or more closed figures in a graphical object.
[solid] [[color] COLOR]
shape
[[color] COLOR border]
boundary [MOVE_STATEMENT] ...
DRAWING_STATEMENT [DRAWING_STATEMENT] ...
[boundary [MOVE_STATEMENT] ...
DRAWING_STATEMENT [DRAWING_STATEMENT] ... ] ...
end shape
solid
Fill the shape with the shape's color. In the case of multiple boundary specifications in a single shape statement, ESL will draw all of the boundaries and then fill the shape.
color COLOR
A color keyword, a string value representing a color keyword, or an integer value representing a color number corresponding to a color available on your system.
COLOR border
Draw the boundaries of the shape in the specified color. The border color specification is separate from the equivalent color specification for the interior of the boundaries.
boundary MOVE_STATEMENT
A move or move arc statement.
DRAWING_STATEMENT
A draw, draw arc, circle, ellipse, move, or move arc statement.
Description
A shape statement must contain at least one boundary specification. A boundary is a closed figure; each boundary consists of one or more drawing statements that describe the outline of a closed figure. A single shape statement can have any number of draw, draw arc, move, and move arc statements. A boundary that contains a circle or an ellipse is already fully closed and cannot have additional drawing statements other than the optional move or move arc statements to position the graphics cursor. A boundary cannot contain a wedge, polygon, or box statement.
ESL closes any unclosed boundary by drawing a single straight line from the ending coordinate position back to the beginning coordinate position of the boundary.
The first drawing statement in a boundary specification can be a move or a move arc statement, to position the graphics cursor for use by subsequent statements. If you do use one of these statements, it must be the first drawing statement in the boundary; it cannot appear later in the boundary, since that would interrupt the continuous lines of the boundary and ESL would be unable to make it a closed figure.
If a boundary consists of only draw statements, the statements must describe at least two non-parallel lines of the boundary.
You can specify any number of boundary specifications between the shape and the end shape keywords. The boundaries can be specified in any order.
After each boundary is drawn, the graphics cursor is restored to its starting position. Therefore, each boundary that you specify in a single shape statement begins at the same position, unless you reposition the graphics cursor by specifying move and/or move arc statements before the boundary's other drawing statements.
Within a boundary, you can move in an arc, draw an arc of specified degrees, or draw an arc to a specified endpoint. (See the move arc and draw arc Drawing Statements.)
You cannot specify colors for individual drawing statements within boundary specifications.
If you do not include the solid keyword, only the shape's perimeter (outline) will be drawn. If no color is specified, the shape will be drawn in the color specified in a pattern reference or object definition.
If you omit the border (and border color), the shape is drawn with the shape's color. If both solid and border are not specified, the shape is drawn with only a border.
Example
disabled key Hello at position 25 25
red shape
boundary
draw to 100 0, 120 100, -20 100, 0 0
end shape
key How at position 75 75
solid green shape
aqua border
boundary move to 100 100
draw 150 0, -150 -100
draw arc to 100 100 clockwise center at 100 50
end shape
key Start at position 10 10
solid shape
boundary circle radius 100
boundary ellipse major 100 minor 40
end shape
See Also
draw Drawing Statement
draw arc Drawing Statement
move Drawing Statement
move arc Drawing Statement