Please enable JavaScript to view this site.

ESL Documentation

The draw arc statement draws, within a boundary, an arc of the specified number of degrees, or an arc to a specified endpoint. The arc always begins at the current position of the graphics cursor. For example, the following statement:

 

draw arc 30 degrees

 

draws an arc 30 degrees (counterclockwise, by default) from the current position of the graphics cursor.

 

The center specification specifies the center of the circle of which the arc is a portion. Therefore, all points along the arc are equidistant from the center point. The center can be specified as an absolute position in the coordinate system of the object (the synonymous center at or center to specifications), as in the following examples:

 

draw arc 30 degrees center at 0 0

or

draw arc -45 degrees center to 50 50

 

The center at and center to specifications are synonymous. They describe the center as an absolute position in the coordinate system of the object.

 

Or, the center can be specified as a position relative to the start of the arc, which is at the current position of the graphics cursor (the center by specification); for example:

 

draw arc 180 degrees center by 75 0

 

You can optionally specify the direction in which the arc is to be drawn. The direction of the arc is specified by the keywords clockwise or counter clockwise. If you omit either specification and specify a positive integer value for the degrees, the arc is drawn counterclockwise. If you omit either specification and specify a negative integer value for the degrees, the arc is drawn clockwise.

 

The center by specification describes the center as an offset from the beginning position of the graphics cursor. In the following example:

 

draw arc 180 degrees center by 75 0

 

ESL establishes the center by adding the specified X and Y offsets to the starting position of the graphics cursor. This statement results in a semicircle with a diameter of 150, as shown below:

 

_img290

 

This figure shows the position of the graphics cursor after the arc is drawn.

 

You must provide a center specification for the first arc in the first shape statement in a graphical object. Thereafter, if you specify a series of move arc and draw arc statements in a single graphical object, and if each arc has the same center, you do not need to provide additional center specifications. If you do not specify a center specification in one of these move arc or draw arc statements, the center is assumed to be the same as the center of the previous arc in that graphical object.