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


2.2.5 Boxes

Boxes are rectangles specified by the coordinates of their top left and bottom right corners. They are purely graphical, and have 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: box? object

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

— Function: make-box top-left bottom-right [color]

Creates and returns a new box object. top-left is the position of the top left of the new box in the form (x . y), and bottom-right is the position of the bottom right of the box. If color is specified, it should be the integer color map index of the color with which to draw the box. If color is not specified, the default box color is used.

— Function: set-box! box top-left bottom-right [color]

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

— Function: box-info box

Returns the parameters of box. The return value is a list in the form:

          ((top-left-x . top-left-y) (bottom-right-x . bottom-right-y) color)
— Function: box-top-left box

Returns the position of the top left corner of box in the form (x . y).

— Function: box-bottom-right box

Returns the position of the bottom right corner of box in the form (x . y).