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
contextcontext where to draw
rotationrotation degree
radiusradius
-
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
contextcontext where to draw
preferencesLine preferences
startstart degree
endend degree
rotationrotation degree
indexindex
topOffsettop offset
radiusradius
marginscontent margins
contextPositionCorrectionOffsetDegreeContext position correction offset degree
ShapeDrawing Protocol Reference