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) -> 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
-
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) -> 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
-
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) -> 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