Please enable JavaScript to view this site.

ESL Documentation

Drawing Statement

Draw a polygon in a graphical object.

[[color] COLOR] polygon XOFFSET1 YOFFSET1, XOFFSET2 YOFFSET2

[, XOFFSET3 YOFFSET3] ...

color COLOR

A string value, integer value, or color keyword representing an ESL color. This specification draws the polygon in the specified color, overriding all other color specifications that otherwise would affect the polygon. If you do not specify a color, ESL draws the polygon in the color specified in the object definition or in other statements that affect the color of the polygon.

XOFFSETn YOFFSETn

Integer values representing the number of co-ordinate positions to move in the X and Y directions, respectively. The values are expressed in the co-ordinate system of the object in which the polygon is being drawn.

Description

All polygons are solid (filled), and are closed figures. If you do not specify a closed figure, ESL automatically closes the figure by drawing a line from the last co-ordinates specified back to the first co-ordinates specified. Therefore, the smallest polygon you can draw (two sets of co-ordinates) is a triangle.

You cannot specify a polygon within a boundary specification.

Example

disabled key start at position 250 100

polygon 10 10, 10 -10