Method
GskStrokeset_dash
since: 4.14
Declaration [src]
void
gsk_stroke_set_dash (
GskStroke* self,
const float* dash,
gsize n_dash
)
Description [src]
Sets the dash pattern to use.
A dash pattern is specified by an array 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 GSK_LINE_CAP_ROUND
or GSK_LINE_CAP_SQUARE
to draw dots or squares along a path.
If n_dash
is 0, if all elements in dash
are 0, or if there are
negative values in dash
, then dashing is disabled.
If n_dash
is 1, an alternating “on” and “off” pattern with the
single dash length provided is assumed.
If n_dash
is uneven, the dash array will be used with the first
element in dash
defining an “on” or “off” in alternating passes
through the array.
You can specify a starting offset into the dash with
gsk_stroke_set_dash_offset()
.
Available since: 4.14