Please enable JavaScript to view this site.

ESL Documentation

When you reference a pattern in an object definition, you can rotate it. Rotation is performed with respect to the pattern's reference point, discussed above. Note that both the original pattern and the rotated pattern begin at the pattern's reference point. A pattern is always drawn beginning at that point, regardless of the specified rotation.

 

The rotate specification rotates a pattern by a specified number of degrees before drawing it. The degrees specification is an integer value, representing the number of degrees by which all points in the pattern are rotated about the pattern's origin. If the degrees value is positive, the pattern is rotated counterclockwise. If it is negative, the pattern is rotated clockwise.

 

Take special care when rotating any patterns that contain a box statement; because a box is always drawn on the horizontal and vertical axes, a rotated box will cause unpredictable results unless you rotate it in 90-degree increments. ESL rotates the four corners of the box by the specified number of degrees and then redraws the smallest box that contains all four corners. For example:

 

key Before at 200 200

    in Primary

 

key Rotated at 400 200

    in Primary

 

pattern Box is

    blue box 50 75

 

response to ShowRotate

    add to Before

        pattern Box

    add to Rotated

        rotate 90

        pattern Box

 

When response to ShowRotate is executed, the pattern Box is displayed in the key Rotated as shown below. The figure on the left shows the unrotated pattern Box; the figure on the right shows how the pattern Box is rotated, and the new box drawn from the four corners of the rotated pattern.

_img296

If the pattern that you are rotating is an ellipse, rotation is approximate. ESL rotates the ellipse to the nearest 90 degrees.

 

The rotations specified for a pattern are cumulative when patterns are nested. The specified rotations are relative to any rotation currently in effect for the pattern.