# JSXGraph Reference

## JavaScript must be enabled in order for you to use JSXGraph and JSXGraph reference. However, it seems JavaScript is either disabled or not supported by your browser.

Class Index | File Index

## Elements

- Angle
- Arc
- Arrow
- Arrowparallel
- Axis
- Bisector
- Bisectorlines
- Circle
- Circumcenter
- Circumcircle
- CircumcircleArc
- Circumcirclesector
- Conic
- Curve
- Ellipse
- Functiongraph
- Glider
- Grid
- Hyperbola
- Image
- Incenter
- Incircle
- Integral
- Intersection
- Line
- Locus
- Midpoint
- Mirrorpoint
- Normal
- Orthogonalprojection
- OtherIntersection
- Parabola
- Parallel
- Parallelpoint
- Perpendicular
- Perpendicularpoint
- Point
- Polygon
- Reflection
- RegularPolygon
- Riemannsum
- Sector
- Segment
- Semicircle
- Slider
- Tangent
- Text
- Ticks
- Tracecurve

## Classes

- _global_
- JXG
- JXG.AbstractRenderer
- JXG.Board
- JXG.C
- JXG.CanvasRenderer
- JXG.Circle
- JXG.Complex
- JXG.Composition
- JXG.Coords
- JXG.Curve
- JXG.Dump
- JXG.GeometryElement
- JXG.GeonextParser
- JXG.Group
- JXG.Image
- JXG.JessieCode
- JXG.JSXGraph
- JXG.Line
- JXG.Math
- JXG.Math.Geometry
- JXG.Math.Numerics
- JXG.Math.Poly
- JXG.Math.Poly.Monomial
- JXG.Math.Poly.Polynomial
- JXG.Math.Poly.Ring
- JXG.Math.Statistics
- JXG.Math.Symbolic
- JXG.Point
- JXG.Polygon
- JXG.Server
- JXG.Server.modules
- JXG.SVGRenderer
- JXG.Text
- JXG.Ticks
- JXG.Turtle
- JXG.Util
- JXG.VMLRenderer

# Class JXG.Text

↳ 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, content, coords, attributes) Construct and handle texts.

Method Summary
Method Attributes | Method Name and Description
--- | ---
<private> | generateTerm(contentStr) Converts the GEONExT syntax of the terms into JavaScript.
| getSize() Return the width of the text element.
<private> | hasPoint(x, y)
<private> | notifyParents(content) Finds dependencies in a given term and notifies the parents by adding the dependent object to the found objects child elements.
| setCoords(x, y) Move the text to new coordinates.
| setPositionDirectly(method, x, y, oldx, oldy) Sets x and y coordinate of the text.
| setText(text) Defines new content.
| setTextJessieCode(text) Defines new content but converts < and > to HTML entities before updating the DOM.
| update() Evaluates the text.
<private> | updateRenderer() The update function of the renderert is called.
| updateSize() Recompute the width and the height of the text box.
| updateText()

Class Detail
JXG.Text(board, content, coords, attributes)
Construct and handle texts.

Parameters:
board
content
coords
attributes

Returns:
  A new geometry element Text

Method Detail
<private> generateTerm(contentStr)
Converts the GEONExT syntax of the terms into JavaScript. Also, all Objects whose name appears in the term are searched and the text is added as child to these objects.

Parameters:
contentStr

See:
  Algebra
  #geonext2JS.

{Array} getSize()
Return the width of the text element.

Returns:
  {Array} [width, height] in pixel

<private> {Boolean} hasPoint(x, y)

Parameters:
{Number} x
{Number} y

Returns:
  {Boolean}

<private> notifyParents(content)
Finds dependencies in a given term and notifies the parents by adding the dependent object to the found objects child elements.

Parameters:
{String} content
  String containing dependencies for the given object.

{object} setCoords(x, y)
Move the text to new coordinates.

Parameters:
{number} x
{number} y

Returns:
  {object} reference to the text object.

setPositionDirectly(method, x, y, oldx, oldy)
Sets x and y coordinate of the text.

Parameters:
{number} method
  The type of coordinates used here. Possible values are JXG.COORDS_BY_USER and JXG.COORDS_BY_SCREEN.
{number} x
  x coordinate in screen/user units
{number} y
  y coordinate in screen/user units
{number} oldx
  previous x coordinate in screen/user units
{number} oldy
  previous y coordinate in screen/user units

{JXG.Text} setText(text)
Defines new content.

Parameters:
{String|function} text

Returns:
  {JXG.Text} Reference to the text object.

setTextJessieCode(text)
Defines new content but converts < and > to HTML entities before updating the DOM.

Parameters:
{String|function} text

update()
Evaluates the text. Then, the update function of the renderer is called.

<private> updateRenderer()
The update function of the renderert 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.

updateText()

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Apr 02 2012 17:54:09 GMT+0200 (MESZ)