StrokeStyle
The characteristics of a stroke that traces a path.
Declaration
type StrokeStyle = { lineWidth?: number; lineCap?: 'butt' | 'round' | 'square'; lineJoin?: 'miter' | 'round' | 'bevel'; miterLimit?: number; dash?: number[]; dashPhase?: number; };@frozen struct StrokeStyleProperties
lineWidthnumberThe width of the stroked path.
lineCap'butt' | 'round' | 'square'The endpoint style of a line.
lineJoin'miter' | 'round' | 'bevel'The join type of a line.
miterLimitnumberA threshold used to determine whether to use a bevel instead of a miter at a join.
dashnumber[]The lengths of painted and unpainted segments used to make a dashed line.
dashPhasenumberHow far into the dash pattern the line starts.
Used by
- strokeBorderReturns a view that is the result of filling the lineWidth-sized border (aka inner stroke) of self with content. This is equivalent to insetting self by lineWidth / 2 and stroking the resulting shape with lineWidth as the line-width.
- strokeTraces the outline of this shape with a color or gradient.
- strokeTraces the outline of this shape with a color or gradient.
- strokeBorderReturns a view that's the result of filling an inner stroke of this view with the content you supply.
See also
More in Styles.
- AccessoryCircularCapacityGaugeStyleA gauge style that displays a closed ring that's partially filled in to indicate the gauge's current value.
- AccessoryCircularGaugeStyleA gauge style that displays an open ring with a marker that appears at a point along the ring to indicate the gauge's current value.
- AccessoryLinearCapacityGaugeStyleA gauge style that displays bar that fills from leading to trailing edges as the gauge's current value increases.
- AccessoryLinearGaugeStyleA gauge style that displays bar with a marker that appears at a point along the bar to indicate the gauge's current value.
- ArrangementViewStyleA style that configures an ArrangementView with an arrangement.
- AutomaticArrangementViewStyleThe default arrangement view style.
- AutomaticControlGroupStyleThe default control group style.
- AutomaticDisclosureGroupStyleA disclosure group style that resolves its appearance automatically based on the current context.
- AutomaticFormStyleThe default form style.
- AutomaticLabeledContentStyleThe default labeled content style.
- AutomaticNavigationSplitViewStyleA navigation split style that resolves its appearance automatically based on the current context.
- AutomaticTableStyleThe default table style in the current context.