SliceDrawing
protocol SliceDrawing : ImageDrawing, ShapeDrawing, SliceCalculating, TextDrawing, WheelMathCalculating
Slice drawing protocol
-
circularSegmentHeight
Extension methodCircular segment height
Declaration
Swift
var circularSegmentHeight: CGFloat { get }
-
margins
Extension methodContent margins
Declaration
Swift
var margins: SFWConfiguration.Margins { get }
-
contextPositionCorrectionOffsetDegree
Extension methodContext position correction offset degree
Declaration
Swift
var contextPositionCorrectionOffsetDegree: CGFloat { get }
-
drawSlice(withIndex:
Extension methodin: forSlice: rotation: start: end: ) Draw slice with content
Declaration
Swift
func drawSlice(withIndex index: Int, in context: CGContext, forSlice slice: Slice, rotation: CGFloat, start: CGFloat, end: CGFloat)
Parameters
index
index
context
context where to draw
slice
slice content object
rotation
rotation degree
start
start degree
end
end degree
-
prepareDraw(text:
Extension methodin: preferences: rotation: index: topOffset: ) Prepare to draw text
Declaration
Swift
func prepareDraw(text: String, in context: CGContext, preferences: TextPreferences, rotation: CGFloat, index: Int, topOffset: CGFloat) -> CGFloat
Parameters
text
text
context
context where to draw
preferences
text preferences
rotation
rotation degree
index
index
topOffset
top offset
Return Value
height of the drawn text