Shape
public protocol Shape : Renderable, View
-
Declaration
Swift
var fillColor: Color { get set }
-
Declaration
Swift
var strokeBorderColor: Color { get set }
-
Declaration
Swift
var style: StrokeStyle { get set }
-
fill(_:
Extension method) Fills this shape with a color.
Declaration
Swift
public func fill(_ color: Color) -> Self
Parameters
color
The color to use when filling this shape.
Return Value
A shape filled with the color you supply.
-
strokeBorder(_:
Extension methodlineWidth: ) Returns a view that is the result of filling the
width
-sized border (aka inner stroke) ofself
withcontent
. This is equivalent to insettingself
bywidth / 2
and stroking the resulting shape withwidth
as the line-width.Declaration
Swift
public func strokeBorder(_ color: Color, lineWidth: CGFloat = 1) -> Self
-
stroke(_:
Extension methodstyle: ) Returns a view that is the result of insetting
self
bystyle.lineWidth / 2
, stroking the resulting shape withstyle
, and then filling withcontent
.Declaration
Swift
public func stroke(_ color: Color, style: StrokeStyle) -> Self