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) -> SelfParameters
colorThe 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) ofselfwithcontent. This is equivalent to insettingselfbywidth / 2and stroking the resulting shape withwidthas 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
selfbystyle.lineWidth / 2, stroking the resulting shape withstyle, and then filling withcontent.Declaration
Swift
public func stroke(_ color: Color, style: StrokeStyle) -> Self
View on GitHub
Shape Protocol Reference