Skip to content

Map

StrokePattern #

Determines whether a stroke should be solid, dotted, or dashed, and the exact characteristics of each.

This is an abstract class and shouldn't be used directly. See usable derivatives: SolidStrokePattern, DashedStrokePattern and DottedStrokePattern.

SolidStrokePattern #

Bases: StrokePattern

A solid/unbroken stroke pattern.

DashedStrokePattern #

Bases: StrokePattern

pattern_fit: PatternFit = PatternFit.SCALE_UP #

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

Defaults to PatternFit.SCALE_UP.

segments: List[ft.Number] = field(default_factory=list) #

DottedStrokePattern #

Bases: StrokePattern

A stroke pattern of circular dots, spaced with spacing_factor.

pattern_fit: PatternFit = PatternFit.SCALE_UP #

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

Defaults to PatternFit.SCALE_UP.

spacing_factor: ft.Number = 1.5 #

The multiplier used to calculate the spacing between dots in a dotted polyline, with respect to Polyline.stroke_width / Polygon.border_stroke_width. A value of 1.0 will result in spacing equal to the stroke_width. Increasing the value increases the spacing with the same scaling.

May also be scaled by the use of PatternFit.SCALE_UP.

Defaults to 1.5.