A stroke_style describes how the lines of a graphical are drawn,
beyond their thickness (graphical<-pen)
and colour. It is used as the graphical<-texture,
in place of one of the texture names such as dashed. One
stroke_style may be shared by many graphicals.
new(S, stroke_style(round, round, vector(8, 4))), send(Path, pen, 3), send(Path, texture, S).
Using a gradient as stroke_style<-paint,
a line can change colour along its length:
new(G, gradient(linear, point(0,0), point(200,0))), send(G, add_stop, 0, colour(red)), send(G, add_stop, 1, colour(blue)), send(Line, texture, stroke_style(paint := G)).
Round and square caps and miter joins make a line cover more than the area spanned by its points. Class line and class path take this into account when computing their area.
butt ends at the end point, round
and square extend half the pen beyond it.
Defaults: butt
Defaults: miter
Defaults: 10
|vector*<-texture
or a vector of numbers holding the lengths of alternating dashes and
gaps. @nil
draws a solid line.
Defaults: @nil
Defaults: 0
|gradient*<-colour.
The paint is ignored for an inactive graphical, which is drawn in its
inactive colour.
Defaults: @nil
|vector*],
paint=[colour|gradient*]