en:chord [BASIC 256 - Language Documentation]

# BASIC 256 - Language Documentation

en:chord

## Chord (Statement)

### Format

chord x_expr, y_expr, width_expr, height_expr, startangle_expr, widthangle_expr
chord ( x_expr, y_expr, width_expr, height_expr, startangle_expr, widthangle_expr )

### Description

Draws an area bounded by an arc and chord (segment) of the circle or ellipse inside the bounding rectangle defined by x_expr, y_expr, width_expr, and height_expr. The center of the circle/ellipse will be in the center of the rectangle. The angles are defined from the 12 o'clock position in a clockwise direction in radians.

As seen in the example below a chord may be used to draw a filled circle or an ellipse by defining the angular width to go all the way around (2*pi).

### Example

    # chord_example.kbs
    # 2012-12-29 j.m.reneau
    #
    # example of chord statement added on 0.9.9.25
    clg
    color black
    rect 140,50,20,150
    color blue
    chord 0,0,300,200,radians(-60), radians(120)
    chord 100,175,60,50,radians(90),radians(180)
    color green
    chord 200,200,25,75,0,pi*2

draws

### See Also

Arc, Chord, Circle, GetPenWidth, Line, PenWidth, Pie, Plot, Poly, Rect, Stamp

### History

0.9.9.25 | New To Version

en/chord.txt · Last modified: 2014/02/08 19:12 by admin