Please enable JavaScript to view this site.

ESL Documentation

You can draw different portions of a single object in different colors. For example, you might color the outline of a circle yellow, three lines of a triangle red, white, and blue, respectively, and a box solid magenta.

 

When you do not specify color in drawing statements, the drawing statements inherit the foreground color defined for the object. But if you do specify a color in a drawing statement, that color takes precedence over the color specified for the object. For example, consider the following object definition:

 

yellow key Diagram at position 50 50

    ...

    blue box 25 25

    move to 100 100

    circle radius 20

 

The Diagram key has the foreground color yellow. The circle is drawn in yellow, because no color is explicitly specified for it. The box is drawn in blue, because the box drawing statement specifies blue, which overrides the color of the object (yellow).