Class Index | File Index

Classes


Class JXG.Text

Text: On creation the GEONExT syntax of -terms are converted into JavaScript syntax. The coordinates can be relative to the coordinates of an element "element".
Defined in: Text.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
JXG.Text(board, contentStr, element, coords, id, name, digits, isLabel, display, layer)
Construct and handle texts.
Field Summary
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 Summary
Method Attributes Method Name and Description
 
Return the width of the text element.
 
setCoords(x, y)
Set the text to new, fixed coordinates.
 
setText(str)
Overwrite the text.
 
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()

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Oct 25 2011 00:43:20 GMT-0000 (UTC)