Class JXG.Text
Text: On creation the GEONExT syntax
of
Defined in: Text.js.
Constructor Attributes | Constructor Name and Description |
---|---|
JXG.Text(board, contentStr, element, coords, id, name, digits, isLabel, display, layer)
Construct and handle texts.
|
Field Attributes | Field Name and Description |
---|---|
There is choice between 'html' and 'internal'
'internal' is the text element of SVG and the textpath element
of VML.
|
|
The font size of the given text.
|
|
The text color of the given text.
|
|
The text opacity of the given text.
|
Method Attributes | Method Name and Description |
---|---|
getSize()
Return the width of the text element.
|
|
setCoords(x, y)
Set the text to new, fixed coordinates.
|
|
setText(str)
Overwrite the text.
|
|
update()
Evaluates the text.
|
|
Recompute the width and the height of the text box.
|
|
updateText()
|
Class Detail
JXG.Text(board, contentStr, element, coords, id, name, digits, isLabel, display, layer)
Construct and handle texts.
- Parameters:
- board
- contentStr
- element
- coords
- id
- name
- digits
- isLabel
- display
- layer
- Returns:
- A new geometry element Text
Field Detail
display
There is choice between 'html' and 'internal'
'internal' is the text element of SVG and the textpath element
of VML.
fontSize
The font size of the given text.
strokeColor
The text color of the given text.
strokeOpacity
The text opacity of the given text.
Method Detail
{array}
getSize()
Return the width of the text element.
- Returns:
- {array} [width, height] in pixel
{object}
setCoords(x, y)
Set the text to new, fixed coordinates.
- Parameters:
- {number} x
- {number} y
- Returns:
- {object} reference to the text object.
{object}
setText(str)
Overwrite the text.
- Parameters:
- {string|function} str
- Returns:
- {object} reference to the text object.
update()
Evaluates the text.
Then, the update function of the renderer
is called.
updateSize()
Recompute the width and the height of the text box.
Update array this.size with pixel values.
The result may differ from browser to browser
by some pixels.
In IE and canvas we use a very crude estimation of the dimensions of
the textbox.
In JSXGraph this.size is necessary for applying rotations in IE and
for aligning text.
- Returns:
updateText()