Text Class
Text is a Jermaine model that supports storing and determining metrics of strings in different graphics contexts.
Constructor
Text
-
string
Parameters:
-
string
StringThe string stored in the Text model
Item Index
Methods
Properties
Methods
initializeGeometry
-
graphicsContext
Determines unrotated and rotated widths and heights for the stored string. Overridden by implementations in graphics drivers.
Parameters:
-
graphicsContext
Object-
angle
Float
-
initializeGeometry
-
graphicsContext
Determines unrotated and rotated widths and heights for the stored string in the canvas environment
Parameters:
-
graphicsContext
Object-
context
Context -
angle
Float -
fontSize
String
-
initializeGeometry
-
graphicsContext
Determines unrotated and rotated widths and heights for the stored string in the raphael environment
Parameters:
-
graphicsContext
Object-
elem
TextElem -
angle
Float -
fontSize
String
-
measureStringHeight
-
graphicsContext
Determines unrotated height for the stored string. Overridden by implementations in graphics drivers.
Parameters:
-
graphicsContext
Object
Returns:
Unrotated height of string.
measureStringHeight
-
context
Determines unrotated height for the stored string in the canvas environment.
Parameters:
-
context
Context
Returns:
Unrotated height of string.
measureStringHeight
-
text
Determines unrotated height for the stored string in the raphael environment.
Parameters:
-
text
TextElem
Returns:
Unrotated height of string.
measureStringWidth
-
graphicsContext
Determines unrotated width for the stored string. Overridden by implementations in graphics drivers.
Parameters:
-
graphicsContext
Object
Returns:
Unrotated width of string.
measureStringWidth
-
context
Determines unrotated width for the stored string in the canvas environment.
Parameters:
-
context
Context
Returns:
Unrotated width of string.
measureStringWidth
-
elem
Determines unrotated width for the stored string in the raphael environment.
Parameters:
-
elem
TextElem
Returns:
Unrotated width of string.
Properties
origHeight
Float
final
The unrotated height of the string
origWidth
Float
final
The unrotated width of the string
rotatedHeight
Float
final
The rotated height of the string
rotatedWidth
Float
final
The rotated width of the string
string
String
The string stored in the Text model