Skip to content

DashedStrokePattern

Inherits: StrokePattern

A stroke pattern of alternating dashes and gaps, defined by segments.

Raises:

Properties

Properties#

pattern_fit class-attribute instance-attribute #

pattern_fit: PatternFit = SCALE_UP

Determines how this stroke pattern should be fit to a line when their lengths are not equal or multiples.

segments class-attribute instance-attribute #

segments: list[Number] = field(default_factory=list)

A list of alternating dash and gap lengths, in pixels.

Raises:

  • ValueError

    If the list does not contain at least two items, or if its length is not even.