ShapeDrawing
protocol ShapeDrawing
Shape drawing protocol
-
drawRectangle(in:
Extension methodrotation: radius: ) Draws rectangle
Declaration
Swift
func drawRectangle(in context: CGContext, rotation: CGFloat, radius: CGFloat)
Parameters
context
context where to draw
rotation
rotation degree
radius
radius
-
drawLine(in:
Extension methodpreferences: start: and: rotation: index: topOffset: radius: margins: contextPositionCorrectionOffsetDegree: ) Draws curved line
Declaration
Swift
func drawLine(in context: CGContext, preferences: LinePreferences, start: CGFloat, and end: CGFloat, rotation: CGFloat, index: Int, topOffset: CGFloat, radius: CGFloat, margins: SFWConfiguration.Margins, contextPositionCorrectionOffsetDegree: CGFloat)
Parameters
context
context where to draw
preferences
Line preferences
start
start degree
end
end degree
rotation
rotation degree
index
index
topOffset
top offset
radius
radius
margins
content margins
contextPositionCorrectionOffsetDegree
Context position correction offset degree