# BASIC 256 - Language Documentation

fr:poly

## Poly

### Format

poly numeric array variable
poly {x1, y1, x2, y2, x3, y3 …}

### Description

Draws a polygon. The sides of the polygon are defined by the values stored in the array, which should be stored as x,y pairs, sequentially. The length of the array/2 will define the number of points. A polygon may also be specified using a list of x,y pairs enclosed in curly braces {}.

### Note

The number of points in the array argument was removed from the poly statement in version 0.9.4.

### See Also

Stamp

### Example

    color blue
    rect 0,0,300,300
    color green
    dim tri(6)
    tri = {100, 100, 200, 200, 100, 200}
    poly tri

    color blue
    rect 0,0,300,300
    color green
    poly {100, 100, 200, 200, 100, 200}

Both programs use the poly statement to draw the following:

fr/poly.txt · Last modified: 2011/03/29 11:56 (external edit)