SliceDrawing

Slice drawing protocol

  • circularSegmentHeight Extension method

    Circular segment height

    Declaration

    Swift

    var circularSegmentHeight: CGFloat { get }
  • margins Extension method

    Content margins

    Declaration

    Swift

    var margins: SFWConfiguration.Margins { get }
  • Context position correction offset degree

    Declaration

    Swift

    var contextPositionCorrectionOffsetDegree: CGFloat { get }
  • 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

  • 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