Package: gsk

Function gsk:stroke-dash

Lambda List

gsk:stroke-dash (stroke)

Syntax

(gsk:stroke-dash stroke) => dash
(setf (gsk:stroke-dash stroke) dash)

Arguments

stroke -- a gsk:stroke instance
dash -- a list of numbers coerced to floats with the dashes

Details

The gsk:stroke-dash function gets the list of dashes in use or nil if dashing is disabled. The (setf gsk:stroke-dash) funtion sets the dash pattern to use by the stroke.

A dash pattern is specified by a list of alternating non-negative values. Each value provides the length of alternate 'on' and 'off' portions of the stroke. Each 'on' segment will have caps applied as if the segment were a separate contour. In particular, it is valid to use an 'on' length of 0 with :round or :square to draw dots or squares along a path.

If dash is empty, if all elements in dash are 0, or if there are negative values in dash, then dashing is disabled. If dash has one element, an alternating 'on' and 'off' pattern with the single dash length provided is assumed. If dash has uneven elements, the dash list will be used with the first element in dash defining an 'on' or 'off' in alternating passes through the list.

You can specify a starting offset into the dash with the gsk:stroke-dash-offset function.

Since 4.14
 

See also

#2024-11-11