Next: , Previous: Boxes, Up: Core object functions


2.2.6 Circles

Circle objects are specified by center position and radius, and are purely graphical with no electrical meaning. They can be drawn in different colors, and with various stroke and fill settings.

See Object color. See Object fill and stroke.

— Function: circle? object

Returns ‘#t’ if and only of object is a circle object.

— Function: make-circle center radius [color]

Creates and returns a new circle object. center is the position of the center of the new circle in the form (x . y), and radius is the integer radius of the circle. If color is specified, it should be the integer color map index of the color with which to draw the circle. If color is not specified, the default circle color is used.

— Function: set-circle! circle center radius [color]

Sets the parameters of circle. The arguments are the same as to make-circle. Returns circle.

— Function: circle-info circle

Returns the parameters of circle as a list of the form:

          ((center-x . center-y) radius color)
— Function: circle-center circle

Returns the position of the center of circle as in the form (x . y).

— Function: circle-radius circle

Returns the radius of circle as an integer.