SliceDrawing
protocol SliceDrawing : ImageDrawing, ShapeDrawing, SliceCalculating, TextDrawing, WheelMathCalculating
Slice drawing protocol
-
circularSegmentHeightExtension methodCircular segment height
Declaration
Swift
var circularSegmentHeight: CGFloat { get } -
marginsExtension methodContent margins
Declaration
Swift
var margins: SFWConfiguration.Margins { get } -
contextPositionCorrectionOffsetDegreeExtension 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
indexindex
contextcontext where to draw
sliceslice content object
rotationrotation degree
startstart degree
endend 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) -> CGFloatParameters
texttext
contextcontext where to draw
preferencestext preferences
rotationrotation degree
indexindex
topOffsettop offset
Return Value
height of the drawn text
SliceDrawing Protocol Reference