Please enable JavaScript to view this site.

ESL Documentation

The circle statement draws a circle. You indicate the size of the circle by specifying its radius.

 

For example:

circle radius 20

 

draws a circle with a radius (or distance from the center) of 20 coordinate positions. ESL automatically draws the circle centered at the current position of the graphics cursor. The final position of the graphics cursor is the same as its initial position. The text cursor is moved to that position.

 

The following example draws a circle inside a box:

 

key BoxCircle at position 50 50

    box 300 300          # Draw a square box.

    move 150 150         # Move to center of box.

    circle radius 150    # Draw a circle touching

                         # the box.

 

The result is shown below:

 

_img283

 

Colored and/or Solid Circle

 

You can color a circle by specifying a color value in the circle statement. For example:

 

red circle radius 30

 

draws the perimeter of the circle in red.

 

If solid is specified, ESL fills the circle with the requested color or with the default color, if none is specified. For example, the statement:

 

solid red circle radius 30

 

draws a circle and fills it with red.