TextDrawing

protocol TextDrawing : CurveTextDrawing

Curved text drawing protocol

  • Draws curved text

    Declaration

    Swift

    func drawCurved(text: String, in context: CGContext, preferences: TextPreferences, rotation: CGFloat, index: Int, topOffset: CGFloat, radius: CGFloat, sliceDegree: CGFloat, contextPositionCorrectionOffsetDegree: CGFloat, margins: SFWConfiguration.Margins) -> CGFloat

    Parameters

    text

    text

    context

    context where to draw

    preferences

    text preferences

    rotation

    rotation degree

    index

    index

    topOffset

    top offset

    radius

    radius

    sliceDegree

    slice degree

    contextPositionCorrectionOffsetDegree

    Context position correction offset degree

    margins

    content margins

    Return Value

    Height of the drawn text

  • Draws text

    Declaration

    Swift

    func drawHorizontal(text: String, in context: CGContext, preferences: TextPreferences, rotation: CGFloat, index: Int, topOffset: CGFloat, radius: CGFloat, sliceDegree: CGFloat, margins: SFWConfiguration.Margins) -> CGFloat

    Parameters

    text

    text

    context

    context where to draw

    preferences

    text preferences

    rotation

    rotation degree

    index

    index

    topOffset

    top offset

    radius

    radius

    sliceDegree

    slice degree

    margins

    content margins

    Return Value

    Height of the drawn text

  • Draws text

    Declaration

    Swift

    func drawVertical(text: String, in context: CGContext, preferences: TextPreferences, rotation: CGFloat, index: Int, topOffset: CGFloat, radius: CGFloat, sliceDegree: CGFloat, margins: SFWConfiguration.Margins) -> CGFloat

    Parameters

    text

    text

    context

    context where to draw

    preferences

    text preferences

    rotation

    rotation degree

    index

    index

    topOffset

    top offset

    radius

    radius

    sliceDegree

    slice degree

    margins

    content margins

    Return Value

    Height of the drawn text