Skip to content

PatternFit

PatternFit #

Bases: Enum

Determines how a non-solid StrokePattern should be fit to a line when their lengths are not equal or multiples

APPEND_DOT = 'appendDot' #

Uses the pattern exactly, truncating the final dash if it does not fit, or adding a single dot at the last point if the final dash does not reach the last point (there is a gap at that location).

EXTEND_FINAL_DASH = 'extendFinalDash' #

Uses the pattern exactly, truncating the final dash if it does not fit, or extending the final dash to the last point if it would not normally reach that point (there is a gap at that location).

Only useful when working with DashedStrokePattern. Similar to APPEND_DOT for DottedStrokePattern.

NONE = 'none' #

Don't apply any specific fit to the pattern - repeat exactly as specified, and stop when the last point is reached.

Not recommended, as it may leave a gap between the final segment and the last point, making it unclear where the line ends.

SCALE_DOWN = 'scaleDown' #

Scale the pattern to ensure it fits an integer number of times into the polyline (smaller version regarding rounding, cf. SCALE_UP).

SCALE_UP = 'scaleUp' #

Scale the pattern to ensure it fits an integer number of times into the polyline (bigger version regarding rounding, cf. SCALE_DOWN).