Please enable JavaScript to view this site.

ESL Documentation

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 boundary can have straight lines, specified by the draw statements. It can also be rounded, using the circle, ellipse, or draw arc statements. A single shape statement can have a mixture of any of these statements.

 

In a single shape statement you can define the boundaries of multiple figures. You can create nested figures, figures that overlap one another, and figures that do not touch one another. Boundaries can be as simple or as complex as you wish. The following is constructed using lines and boundaries:

 

_img287

 

Since a boundary is a closed figure, a boundary specification must result in either a closed figure or a figure that ESL can close. 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 statements in a boundary specification can be one or more move or move arc statements, to position the graphics cursor for use by subsequent statements. You can only use these statements prior to the first draw statement; they cannot appear later in the boundary, since they would interrupt the continuous lines of the boundary and ESL would be unable to make a closed figure.

 

The circle and ellipse statements can be specified in boundary specifications. A boundary that contains either of these statements is already fully closed; it cannot have additional drawing statements other than the optional move or move arc statements to position the graphics cursor. For example, the following statement:

 

solid red shape

    boundary circle radius 30

    boundary ellipse major 30 minor 10

end shape

 

is a shape statement with two boundary specifications. The first boundary is a circle, and describes an outer boundary. The second boundary is an ellipse, and describes a hole that is not filled (colored). This shape is shown below:

 

_img288

If a boundary consists of only straight lines (that is, draw statements), the statements must describe at least two lines of the boundary.

 

A single draw arc statement can be a complete boundary specification because ESL can draw a straight line between the starting point and the endpoint of the arc.