Previous: Object color, Up: General object functions


2.2.1.5 Object fill and stroke

Graphical object subtypes – lines, boxes, circles, arcs and paths – are drawn with a stroke pattern that can be configured in detail.

— Function: object-stroke object

Returns the stroke settings of the object, which must be a line, box, circle, arc or path object. The return value is a list of parameters:

  1. stroke width, as an integer number of world units
  2. cap style, one of the symbols none, square or round.
  3. dash style, one of the symbols solid, dotted, dashed, center or phantom.
  4. up to two dash parameters, depending on the dash style:
    • for solid lines, no parameters;
    • for dotted lines, dot spacing;
    • for other styles, dot/dash spacing and dash length.

— Function: set-object-stroke! object width cap dash [dash-space [dash-length]]

Set the stroke settings of the object, which must be a line, box, circle, arc or path object. The arguments are the same as the contents of the list returned by object-stroke. Returns object.

— Function: object-stroke-width object

Returns the integer stroke width of object, which must be a line, box, circle, arc or path object.

— Function: object-stroke-cap object

Returns the stroke cap style of object, which must be a line, box, circle, arc or path object. The returned value is one of the symbols none, square or round.

— Function: object-stroke-dash object

Returns the dash style of object, which must be a line, box, circle, arc or path object. The return value is a list of between one and three parameters:

  1. dash style, one of the symbols solid, dotted, dashed, center or phantom.
  2. for styles other than solid, dot/dash spacing;
  3. for dashed, center and phantom, dash length.

Some types of object – boxes, circles and paths – can have their interiors filled with a variety of patterns.

— Function: object-fill object

Returns the fill settings of object, which must be a box, circle or path object. The return value is a list of one to six parameters:

  1. fill style, one of the symbols hollow, solid, mesh or hatch;
  2. up to five fill parameters, depending on fill style:
    1. none for hollow or solid fills;
    2. line width, line angle (in degrees) and line spacing for hatch fills;
    3. line width, first angle and spacing, and second angle and spacing for mesh fills.

— Function: set-object-fill! object fill-type . fill-args

Sets the fill settings of object, which must be a box, circle or path object. The arguments are the same as the contents of the list returned by object-fill. Returns object.