TextDrawing
protocol TextDrawing : CurveTextDrawing
Curved text drawing protocol
-
drawCurved(text:Extension methodin: preferences: rotation: index: topOffset: radius: sliceDegree: contextPositionCorrectionOffsetDegree: margins: ) 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) -> CGFloatParameters
texttext
contextcontext where to draw
preferencestext preferences
rotationrotation degree
indexindex
topOffsettop offset
radiusradius
sliceDegreeslice degree
contextPositionCorrectionOffsetDegreeContext position correction offset degree
marginscontent margins
Return Value
Height of the drawn text
-
drawHorizontal(text:Extension methodin: preferences: rotation: index: topOffset: radius: sliceDegree: margins: ) 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) -> CGFloatParameters
texttext
contextcontext where to draw
preferencestext preferences
rotationrotation degree
indexindex
topOffsettop offset
radiusradius
sliceDegreeslice degree
marginscontent margins
Return Value
Height of the drawn text
-
drawVertical(text:Extension methodin: preferences: rotation: index: topOffset: radius: sliceDegree: margins: ) 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) -> CGFloatParameters
texttext
contextcontext where to draw
preferencestext preferences
rotationrotation degree
indexindex
topOffsettop offset
radiusradius
sliceDegreeslice degree
marginscontent margins
Return Value
Height of the drawn text
TextDrawing Protocol Reference