Please enable JavaScript to view this site.

ESL Documentation

In addition to the drawing statements that create built-in patterns (such as the box, the circle, and the ellipse discussed above), you can also define your own patterns.

 

A pattern is a set of drawing statements. Defining and referencing patterns can significantly reduce the amount of time you spend in creating graphical objects. Once you have defined a pattern, you can specify an entire series of drawing statements in the definition of a graphical object simply by referencing the name of the pattern, rather than by repeating all of the drawing statements in the contents of each graphical object that will contain them. A single object definition can have many pattern references, as well as other drawing statements. (Textual regions do not contain graphics, and therefore cannot contain patterns.)

 

You use the pattern is statement to define a pattern as a set of drawing statements. You use the pattern statement to reference a pattern that you have defined.

 

Modifications to the display of a basic pattern can be made when the pattern is referenced. For example, the color of a pattern, or the color of one or more of the drawing statements of a pattern, can be specified in a pattern reference. A pattern can be displayed as larger or smaller than the size in which it was defined, and it can be rotated.

 

You can reference a pattern in the definition of another pattern. Patterns can be nested to any depth.

 

You can use only those drawing statements that are legal for graphical objects; for example:

 

pattern GraphAxes is

    black draw -300 0, 0 300

    move 0 -300

    red draw 0 -300