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

Classes


Class JXG.AbstractRenderer


      ↳ JXG.AbstractRenderer

JXG.AbstractRenderer

Defined in: abstract.js.

Class Summary
Constructor Attributes Constructor Name and Description
 

This class defines the interface to the graphics part of JSXGraph.

Field Summary
Field Attributes Field Name and Description
 
The HTML element that stores the JSXGraph board in it.
 
If this property is set to true the visual properties of the elements are updated on every update.
<private>  
True if the browsers' SVG engine supports foreignObject.
 
This is used to easily determine which renderer we are using
 
The vertical offset for Text elements.
Method Summary
Method Attributes Method Name and Description
<private>  
_css2js(cssString)
Converts string containing CSS properties into array with key-value pair objects.
<private>  
_setArrowWidth(node, width, parentNode)
Updates width of an arrow DOM node.
<private>  
_updateVisual(element, not, enhanced)
Update visual properties, but only if JXG.AbstractRenderer#enhancedRendering or enhanced is set to true.
 
appendChildPrim(node, level)
Appends a node to a specific layer level.
 
appendNodesToElement(element, type)
Stores the rendering nodes.
 
Changes the style of a JXG.Point.
 
createPrim(type, id)
Creates a node of a given type with a given id.
 
Create crosshair elements (Fadenkreuz) for presentations.
 
display(element, value)
Shows or hides an element on the canvas; Only a stub, requires implementation in the derived renderer.
 
displayCopyright(str, fontsize)
Shows a small copyright notice in the top left corner of the board.
 
Draws a JXG.Curve on the JXG.Board.
 
Draws a JXG.Circle
 
drawImage(element)
Draws an JXG.Image on a board; This is just a template that has to be implemented by special renderers.
 
An internal text is a JXG.Text element which is drawn using only the given renderer but no HTML.
 
Draws a line on the JXG.Board.
 
Draws a point on the JXG.Board.
 
Draws a JXG.Polygon on the JXG.Board.
 
Displays a JXG.Text on the JXG.Board by putting a HTML div over it.
 
Creates a rendering node for ticks added to a line.
 
drawZoomBar(board, attr)
The tiny zoom bar shown on the bottom of a board (if showNavigation on board creation is true).
 
dumpToCanvas(canvasId)
Convert SVG construction to canvas.
 
Wrapper for getElementById for maybe other renderers which elements are not directly accessible by DOM methods like document.getElementById().
 
getPositionArrowHead(el, c1, c2, strokewidth)
Shorten the line length such that the arrow head touches the start or end point and such that the arrow head ends exactly at the start / end position of the line.
 
hide(element)
Hides an element on the canvas; Only a stub, requires implementation in the derived renderer.
 
Hide a specific crosshair.
 
Highlights an object, i.e.
 
joinTransforms(el, transformations)
Multiplication of transformations without updating.
 
makeArrows(element)
Can be used to create the nodes to display arrows.
 
Uses the normal colors of an object, i.e.
 
remove(node)
Removes an element node.
 
Puts an object from draft mode back into normal mode.
 
Remove an element and provide a function that inserts it into its original position.
 
resize(w, h)
Resizes the rendering element
 
setBuffering(node, type)
Sets the buffering as recommended by SVGWG.
 
setDashStyle(element)
Sets an element's dash style.
 
Puts an object into draft mode, i.e.
 
setGradient(element)
Sets up nodes for rendering a gradient fill.
 
setLinecap(element)
Set the line endings (linecap) of a straight line.
 
setObjectFillColor(element, color, opacity)
Sets an objects fill color.
 
setObjectStrokeColor(element, color, opacity)
Changes an objects stroke color to the given color.
 
setObjectStrokeWidth(element, width)
Sets an element's stroke width.
 
setObjectTransition(element, duration)
Sets the transition duration (in milliseconds) for fill color and stroke color and opacity.
 
setPropertyPrim(node, key, val)
Sets a node's attribute.
 
setShadow(element)
Sets the shadow properties to a geometry element.
 
show(element)
Shows a hidden element on the canvas; Only a stub, requires implementation in the derived renderer.
 
Show a specific crosshair.
 
Stop redraw.
 
transformImage(element, transformations)
Applies transformations on images and text elements.
 
Restart redraw.
<private>  
updateArrowSize(el, obj)
Read the attribute "size" of the arrow heads.
 
Updates visual appearance of the renderer element assigned to the given JXG.Curve.
 
Updates visual appearance of a given JXG.Circle on the JXG.Board.
 
updateEllipsePrim(node, x, y, rx, ry)
Updates an ellipse node primitive.
 
updateGradient(element)
Updates the gradient fill.
 
Updates the properties of an JXG.Image element.
 
updateImageStyle(el, doHighlight)
Updates CSS style properties of a JXG.Image node.
 
updateImageURL(element)
If the URL of the image is provided by a function the URL has to be updated during updateImage()
 
Updates visual properties of an already existing JXG.Text element.
<private>  
updateInternalTextStyle(el, strokeColor, strokeOpacity)
Set color and opacity of internal texts.
 
Updates visual appearance of the renderer element assigned to the given JXG.Line.
<private>  
updateLineEndings(el, strokeWidth)
Corrects the line length if there are arrow heads, such that the arrow ends exactly at the intended position.
 
updateLinePrim(node, p1x, p1y, p2x, p2y, board)
Refreshes a line node.
 
updatePathPrim(node, pathString, board)
Updates a path element.
 
Builds a path data string from a JXG.Curve element such that the curve looks like hand drawn.
 
updatePathStringPoint(element, size, type)
Builds a path data string to draw a point with a face other than rect and circle.
 
Builds a path data string from a JXG.Curve element.
 
Updates visual appearance of the renderer element assigned to the given JXG.Point.
 
Updates properties of a JXG.Polygon's rendering node.
 
updatePolygonPrim(node, element)
Update a polygon primitive.
 
updateRectPrim(node, x, y, w, h)
Update a rectangle primitive.
 
Updates visual properties of an already existing JXG.Text element.
 
updateTextStyle(el, doHighlight)
Updates font-size, color and opacity propertiey and CSS style properties of a JXG.Text node.
 
updateTicks(element)
Update Ticks on a JXG.Line.
 
Move a specific crosshair.
Class Detail
JXG.AbstractRenderer()

This class defines the interface to the graphics part of JSXGraph. This class is an abstract class, it actually does not render anything. This is up to the JXG.SVGRenderer, JXG.VMLRenderer, and JXG.CanvasRenderer classes. We strongly discourage you from using the methods in these classes directly. Only the methods which are defined in this class and are not marked as private are guaranteed to exist in any renderer instance you can access via JXG.Board#renderer. But not all methods may work as expected.

The methods of this renderer can be divided into different categories:

Draw basic elements
In this category we find methods to draw basic elements like JXG.Point, JXG.Line, and JXG.Curve as well as assisting methods tightly bound to these basic painters. You do not need to implement these methods in a descendant renderer but instead implement the primitive drawing methods described below. This approach is encouraged when you're using a XML based rendering engine like VML and SVG. If you want to use a bitmap based rendering technique you are supposed to override these methods instead of the primitive drawing methods.
Draw primitives
This category summarizes methods to handle primitive nodes. As creation and management of these nodes is different among different the rendering techniques most of these methods are purely virtual and need proper implementation if you choose to not overwrite the basic element drawing methods.
Attribute manipulation
In XML based renders you have to manipulate XML nodes and their attributes to change the graphics. For that purpose attribute manipulation methods are defined to set the color, opacity, and other things. Please note that some of these methods are required in bitmap based renderers, too, because some elements like JXG.Text can be HTML nodes floating over the construction.
Renderer control
Methods to clear the drawing board or to stop and to resume the rendering engine.

See:
JXG.SVGRenderer
JXG.VMLRenderer
JXG.CanvasRenderer
Field Detail
{Node} container
The HTML element that stores the JSXGraph board in it.

{Boolean} enhancedRendering
If this property is set to true the visual properties of the elements are updated on every update. Visual properties means: All the stuff stored in the JXG.GeometryElement#visProp property won't be set if enhancedRendering is false
Default Value:
true

<private> {Boolean} supportsForeignObject
True if the browsers' SVG engine supports foreignObject. Not supporting browsers are IE 9 - 11.

{String} type
This is used to easily determine which renderer we are using
if (board.renderer.type === 'vml') {
    // do something
}

{number} vOffsetText
The vertical offset for Text elements. Every Text element will be placed this amount of pixels below the user given coordinates.
Default Value:
8
Method Detail
<private> {Array} _css2js(cssString)
Converts string containing CSS properties into array with key-value pair objects.
Parameters:
{String} cssString
String containing CSS properties
Returns:
{Array} Array of CSS key-value pairs
Examples:
"color:blue; background-color:yellow" is converted to
[{'color': 'blue'}, {'backgroundColor': 'yellow'}]

<private> _setArrowWidth(node, width, parentNode)
Updates width of an arrow DOM node. Used in
Parameters:
{Node} node
The arrow node.
{Number} width
{Node} parentNode
Used in IE only

<private> _updateVisual(element, not, enhanced)
Update visual properties, but only if JXG.AbstractRenderer#enhancedRendering or enhanced is set to true.
Parameters:
{JXG.GeometryElement} element
The element to update
{Object} not Optional, Default: {}
Select properties you don't want to be updated: {fill: true, dash: true} updates everything except for fill and dash. Possible values are stroke, fill, dash, shadow, gradient.
{Boolean} enhanced Optional, Default: false
If true, JXG.AbstractRenderer#enhancedRendering is assumed to be true.

appendChildPrim(node, level)
Appends a node to a specific layer level. This is just an abstract method and has to be implemented in all renderers that want to use the createPrim model to draw.
Parameters:
{Node} node
A DOM tree node.
{Number} level
The layer the node is attached to. This is the index of the layer in JXG.SVGRenderer#layer or the z-index style property of the node in VMLRenderer.

appendNodesToElement(element, type)
Stores the rendering nodes. This is an abstract method which has to be implemented in all renderers that use the createPrim method.
Parameters:
{JXG.GeometryElement} element
A JSXGraph element.
{String} type
The XML node name. Only used in VMLRenderer.

changePointStyle(el)
Changes the style of a JXG.Point. This is required because the point styles differ in what elements have to be drawn, e.g. if the point is marked by a "x" or a "+" two lines are drawn, if it's marked by spot a circle is drawn. This method removes the old renderer element(s) and creates the new one(s).
Parameters:
{JXG.Point} el
Reference to a JXG.Point object, that's style is changed.
See:
Point
JXG.Point
JXG.AbstractRenderer#updatePoint
JXG.AbstractRenderer#drawPoint

{Node} createPrim(type, id)
Creates a node of a given type with a given id.
Parameters:
{String} type
The type of the node to create.
{String} id
Set the id attribute to this.
Returns:
{Node} Reference to the created node.

createTouchpoints(n)
Create crosshair elements (Fadenkreuz) for presentations.
Parameters:
{Number} n
Number of crosshairs.

display(element, value)
Shows or hides an element on the canvas; Only a stub, requires implementation in the derived renderer.
Parameters:
{JXG.GeometryElement} element
Reference to the object that has to appear.
{Boolean} value
true to show the element, false to hide the element.

displayCopyright(str, fontsize)
Shows a small copyright notice in the top left corner of the board.
Parameters:
{String} str
The copyright notice itself
{Number} fontsize
Size of the font the copyright notice is written in

drawCurve(el)
Draws a JXG.Curve on the JXG.Board.
Parameters:
{JXG.Curve} el
Reference to a graph object, that has to be plotted.
See:
Curve
JXG.Curve
JXG.AbstractRenderer#updateCurve

drawEllipse(el)
Draws a JXG.Circle
Parameters:
{JXG.Circle} el
Reference to a JXG.Circle object that has to be drawn.
See:
Circle
JXG.Circle
JXG.AbstractRenderer#updateEllipse

drawImage(element)
Draws an JXG.Image on a board; This is just a template that has to be implemented by special renderers.
Parameters:
{JXG.Image} element
Reference to the image object that is to be drawn
See:
Image
JXG.Image
JXG.AbstractRenderer#updateImage

drawInternalText(element)
An internal text is a JXG.Text element which is drawn using only the given renderer but no HTML. This method is only a stub, the drawing is done in the special renderers.
Parameters:
{JXG.Text} element
Reference to a JXG.Text object
See:
Text
JXG.Text
JXG.AbstractRenderer#updateInternalText
JXG.AbstractRenderer#drawText
JXG.AbstractRenderer#updateText
JXG.AbstractRenderer#updateTextStyle

drawLine(el)
Draws a line on the JXG.Board.
Parameters:
{JXG.Line} el
Reference to a line object, that has to be drawn.
See:
Line
JXG.Line
JXG.AbstractRenderer#updateLine

drawPoint(el)
Draws a point on the JXG.Board.
Parameters:
{JXG.Point} el
Reference to a JXG.Point object that has to be drawn.
See:
Point
JXG.Point
JXG.AbstractRenderer#updatePoint
JXG.AbstractRenderer#changePointStyle

drawPolygon(el)
Draws a JXG.Polygon on the JXG.Board.
Parameters:
{JXG.Polygon} el
Reference to a Polygon object, that is to be drawn.
See:
Polygon
JXG.Polygon
JXG.AbstractRenderer#updatePolygon

drawText(el)
Displays a JXG.Text on the JXG.Board by putting a HTML div over it.
Parameters:
{JXG.Text} el
Reference to an JXG.Text object, that has to be displayed
See:
Text
JXG.Text
JXG.AbstractRenderer#drawInternalText
JXG.AbstractRenderer#updateText
JXG.AbstractRenderer#updateInternalText
JXG.AbstractRenderer#updateTextStyle

drawTicks(el)
Creates a rendering node for ticks added to a line.
Parameters:
{JXG.Line} el
A arbitrary line.
See:
Line
Ticks
JXG.Line
JXG.Ticks
JXG.AbstractRenderer#updateTicks

drawZoomBar(board, attr)
The tiny zoom bar shown on the bottom of a board (if showNavigation on board creation is true).
Parameters:
{JXG.Board} board
Reference to a JSXGraph board.
{Object} attr
Attributes of the navigation bar

dumpToCanvas(canvasId)
Convert SVG construction to canvas. Only available on SVGRenderer.
Parameters:
canvasId
See:
JXG.SVGRenderer#dumpToCanvas

{Object} getElementById(id)
Wrapper for getElementById for maybe other renderers which elements are not directly accessible by DOM methods like document.getElementById().
Parameters:
{String} id
Unique identifier for element.
Returns:
{Object} Reference to a JavaScript object. In case of SVG/VMLRenderer it's a reference to a SVG/VML node.

{object} getPositionArrowHead(el, c1, c2, strokewidth)
Shorten the line length such that the arrow head touches the start or end point and such that the arrow head ends exactly at the start / end position of the line.
Parameters:
{JXG.Line} el
Reference to the line object that gets arrow heads.
{JXG.Coords} c1
Coords of the first point of the line (after JXG.Geometry#calcStraight).
{JXG.Coords} c2
Coords of the second point of the line (after JXG.Geometry#calcStraight).
strokewidth
Returns:
{object} Object containing how much the line has to be shortened. Data structure: {d1x, d1y, d2x, d2y, sFirst, sLast}. sFirst and sLast is the length by which firstArrow and lastArrow have to shifted such that there is no gap between arrow head and line. Additionally, if one of these values is zero, the arrow is not displayed. This is the case, if the line length is very short.

hide(element)
Hides an element on the canvas; Only a stub, requires implementation in the derived renderer. Please use JXG.AbstractRenderer#display instead
Parameters:
{JXG.GeometryElement} element
Reference to the geometry element that has to disappear.
See:
JXG.AbstractRenderer#show

hideTouchpoint(i)
Hide a specific crosshair.
Parameters:
{Number} i
Number of the crosshair to show

{JXG.AbstractRenderer} highlight(el)
Highlights an object, i.e. changes the current colors of the object to its highlighting colors and highlighting stroke width.
Parameters:
{JXG.GeometryElement} el
Reference of the object that will be highlighted.
Returns:
{JXG.AbstractRenderer} Reference to the renderer
See:
JXG.AbstractRenderer#updateTextStyle

{Array} joinTransforms(el, transformations)
Multiplication of transformations without updating. That means, at that point it is expected that the matrices contain numbers only. First, the origin in user coords is translated to (0,0) in screen coords. Then, the stretch factors are divided out. After the transformations in user coords, the stretch factors are multiplied in again, and the origin in user coords is translated back to its position. This method does not have to be implemented in a new renderer.
Parameters:
{JXG.GeometryElement} el
A JSXGraph element. We only need its board property.
{Array} transformations
An array of JXG.Transformations.
Returns:
{Array} A matrix represented by a two dimensional array of numbers.
See:
JXG.AbstractRenderer#transformImage

makeArrows(element)
Can be used to create the nodes to display arrows. This is an abstract method which has to be implemented in any descendant renderer.
Parameters:
{JXG.GeometryElement} element
The element the arrows are to be attached to.

{JXG.AbstractRenderer} noHighlight(el)
Uses the normal colors of an object, i.e. the opposite of JXG.AbstractRenderer#highlight.
Parameters:
{JXG.GeometryElement} el
Reference of the object that will get its normal colors.
Returns:
{JXG.AbstractRenderer} Reference to the renderer
See:
JXG.AbstractRenderer#updateTextStyle

remove(node)
Removes an element node. Just a stub.
Parameters:
{Node} node
The node to remove.

removeDraft(el)
Puts an object from draft mode back into normal mode.
Parameters:
{JXG.GeometryElement} el
Reference of the object that no longer is in draft mode.

{Function} removeToInsertLater(el)
Remove an element and provide a function that inserts it into its original position. This method is taken from this article https://developers.google.com/speed/articles/javascript-dom.
Author: KeeKim Heng, Google Web Developer.
Parameters:
{Element} el
The element to be temporarily removed
Returns:
{Function} A function that inserts the element into its original position

resize(w, h)
Resizes the rendering element
Parameters:
{Number} w
New width
{Number} h
New height

setBuffering(node, type)
Sets the buffering as recommended by SVGWG. Until now only Opera supports this and will be ignored by other browsers. Although this feature is only supported by SVG we have this method in JXG.AbstractRenderer because it is called from outside the renderer.
Parameters:
{Node} node
The SVG DOM Node which buffering type to update.
{String} type
Either 'auto', 'dynamic', or 'static'. For an explanation see http://www.w3.org/TR/SVGTiny12/painting.html#BufferedRenderingProperty.

setDashStyle(element)
Sets an element's dash style.
Parameters:
{JXG.GeometryElement} element
An JSXGraph element.

setDraft(el)
Puts an object into draft mode, i.e. it's visual appearance will be changed. For GEONExT backwards compatibility.
Parameters:
{JXG.GeometryElement} el
Reference of the object that is in draft mode.

setGradient(element)
Sets up nodes for rendering a gradient fill.
Parameters:
element

setLinecap(element)
Set the line endings (linecap) of a straight line. Possible values for the attribute 'linecap' are: 'butt', 'round', 'square'. The default value is 'butt'. Not available for VML renderer.
Parameters:
{JXG.Line} element
A arbitrary line.
See:
Line
JXG.Line
JXG.AbstractRenderer#updateLine

setObjectFillColor(element, color, opacity)
Sets an objects fill color.
Parameters:
{JXG.GeometryElement} element
Reference of the object that wants a new fill color.
{String} color
Color in a HTML/CSS compatible format. If you don't want any fill color at all, choose 'none'.
{Number} opacity
Opacity of the fill color. Must be between 0 and 1.

setObjectStrokeColor(element, color, opacity)
Changes an objects stroke color to the given color.
Parameters:
{JXG.GeometryElement} element
Reference of the JXG.GeometryElement that gets a new stroke color.
{String} color
Color value in a HTML compatible format, e.g. #00ff00 or green for green.
{Number} opacity
Opacity of the fill color. Must be between 0 and 1.

setObjectStrokeWidth(element, width)
Sets an element's stroke width.
Parameters:
{JXG.GeometryElement} element
Reference to the geometry element.
{Number} width
The new stroke width to be assigned to the element.

setObjectTransition(element, duration)
Sets the transition duration (in milliseconds) for fill color and stroke color and opacity.
Parameters:
{JXG.GeometryElement} element
Reference of the object that wants a new transition duration.
{Number} duration
(Optional) duration in milliseconds. If not given, element.visProp.transitionDuration is taken. This is the default.

setPropertyPrim(node, key, val)
Sets a node's attribute.
Parameters:
{Node} node
The node that is to be updated.
{String} key
Name of the attribute.
{String} val
New value for the attribute.

setShadow(element)
Sets the shadow properties to a geometry element. This method is only a stub, it is implemented in the actual renderers.
Parameters:
{JXG.GeometryElement} element
Reference to a geometry object, that should get a shadow

show(element)
Shows a hidden element on the canvas; Only a stub, requires implementation in the derived renderer. Please use JXG.AbstractRenderer#display instead
Parameters:
{JXG.GeometryElement} element
Reference to the object that has to appear.
See:
JXG.AbstractRenderer#hide

showTouchpoint(i)
Show a specific crosshair.
Parameters:
{Number} i
Number of the crosshair to show

suspendRedraw()
Stop redraw. This method is called before every update, so a non-vector-graphics based renderer can use this method to delete the contents of the drawing panel. This is an abstract method every descendant renderer should implement, if appropriate.
See:
JXG.AbstractRenderer#unsuspendRedraw

transformImage(element, transformations)
Applies transformations on images and text elements. This method is just a stub and has to be implemented in all descendant classes where text and image transformations are to be supported.
Parameters:
{JXG.Image|JXG.Text} element
A JXG.Image or JXG.Text object.
{Array} transformations
An array of JXG.Transformation objects. This is usually the transformations property of the given element el.

unsuspendRedraw()
Restart redraw. This method is called after updating all the rendering node attributes.
See:
JXG.AbstractRenderer#suspendRedraw

<private> {JXG.AbstractRenderer} updateArrowSize(el, obj)
Read the attribute "size" of the arrow heads. Multiplied with the stroke width of the line this gives the absolute size of the arrow heads. Then the arrow heads are redrawn by the renderer.
Parameters:
{JXG.Line} el
Reference to a line object, that has to be drawn.
{Object} obj
Reference to a object returned by JXG.AbstractRenderer#getPositionArrowHead
Returns:
{JXG.AbstractRenderer} Reference to the renderer
See:
Line
JXG.Line
JXG.AbstractRenderer#updateLine
JXG.AbstractRenderer#getPositionArrowHead

updateCurve(el)
Updates visual appearance of the renderer element assigned to the given JXG.Curve.
Parameters:
{JXG.Curve} el
Reference to a JXG.Curve object, that has to be updated.
See:
Curve
JXG.Curve
JXG.AbstractRenderer#drawCurve

updateEllipse(el)
Updates visual appearance of a given JXG.Circle on the JXG.Board.
Parameters:
{JXG.Circle} el
Reference to a JXG.Circle object, that has to be updated.
See:
Circle
JXG.Circle
JXG.AbstractRenderer#drawEllipse

updateEllipsePrim(node, x, y, rx, ry)
Updates an ellipse node primitive. This is an abstract method which has to be implemented in all renderers that use the createPrim method.
Parameters:
{Node} node
Reference to the node.
{Number} x
Centre X coordinate
{Number} y
Centre Y coordinate
{Number} rx
The x-axis radius.
{Number} ry
The y-axis radius.

updateGradient(element)
Updates the gradient fill.
Parameters:
{JXG.GeometryElement} element
An JSXGraph element with an area that can be filled.

updateImage(el)
Updates the properties of an JXG.Image element.
Parameters:
{JXG.Image} el
Reference to an JXG.Image object, that has to be updated.
See:
Image
JXG.Image
JXG.AbstractRenderer#drawImage

updateImageStyle(el, doHighlight)
Updates CSS style properties of a JXG.Image node. In SVGRenderer opacity is the only available style element. This function is called by highlight() and nohighlight(). This function works for VML. It does not work for Canvas. SVGRenderer overwrites this method.
Parameters:
{JXG.Text} el
Reference to the JXG.Image object, that has to be updated.
{Boolean} doHighlight
See:
Image
JXG.Image
JXG.AbstractRenderer#highlight
JXG.AbstractRenderer#noHighlight

updateImageURL(element)
If the URL of the image is provided by a function the URL has to be updated during updateImage()
Parameters:
{JXG.Image} element
Reference to an image object.
See:
JXG.AbstractRenderer#updateImage

updateInternalText(element)
Updates visual properties of an already existing JXG.Text element.
Parameters:
{JXG.Text} element
Reference to an JXG.Text object, that has to be updated.
See:
Text
JXG.Text
JXG.AbstractRenderer#drawInternalText
JXG.AbstractRenderer#drawText
JXG.AbstractRenderer#updateText
JXG.AbstractRenderer#updateTextStyle

<private> updateInternalTextStyle(el, strokeColor, strokeOpacity)
Set color and opacity of internal texts. This method is used for Canvas and VML. SVG needs its own version.
Parameters:
el
strokeColor
strokeOpacity
See:
JXG.AbstractRenderer#updateTextStyle
JXG.SVGRenderer#updateInternalTextStyle

updateLine(el)
Updates visual appearance of the renderer element assigned to the given JXG.Line.
Parameters:
{JXG.Line} el
Reference to the JXG.Line object that has to be updated.
See:
Line
JXG.Line
JXG.AbstractRenderer#drawLine

<private> {Object} updateLineEndings(el, strokeWidth)
Corrects the line length if there are arrow heads, such that the arrow ends exactly at the intended position. Calls the renderer method to draw the line.
Parameters:
{JXG.Line} el
Reference to a line object, that has to be drawn.
{Number} strokeWidth
Stroke width of the line. This determines the size of the arrow head.
Returns:
{Object} Returns the object returned by JXG.AbstractRenderer#getPositionArrowHead. This contains the information in horizontal and vertical pixels how much the line has to be shortened on each end.
See:
Line
JXG.Line
JXG.AbstractRenderer#updateLine
JXG.AbstractRenderer#getPositionArrowHead

updateLinePrim(node, p1x, p1y, p2x, p2y, board)
Refreshes a line node. This is an abstract method which has to be implemented in all renderers that use the createPrim method.
Parameters:
{Node} node
The node to be refreshed.
{Number} p1x
The first point's x coordinate.
{Number} p1y
The first point's y coordinate.
{Number} p2x
The second point's x coordinate.
{Number} p2y
The second point's y coordinate.
{JXG.Board} board

updatePathPrim(node, pathString, board)
Updates a path element. This is an abstract method which has to be implemented in all renderers that use the createPrim method.
Parameters:
{Node} node
The path node.
{String} pathString
A string formatted like e.g. 'M 1,2 L 3,1 L5,5'. The format of the string depends on the rendering engine.
{JXG.Board} board
Reference to the element's board.

updatePathStringBezierPrim(element)
Builds a path data string from a JXG.Curve element such that the curve looks like hand drawn. Since the path data strings heavily depend on the underlying rendering technique this method is just a stub. Although such a path string is of no use for the CanvasRenderer, this method is used there to draw a path directly.
Parameters:
element

updatePathStringPoint(element, size, type)
Builds a path data string to draw a point with a face other than rect and circle. Since the format of such a string usually depends on the renderer this method is only an abstract method. Therefore, it has to be implemented in the descendant renderer itself unless the renderer does not use the createPrim interface but the draw* interfaces to paint.
Parameters:
{JXG.Point} element
The point element
{Number} size
A positive number describing the size. Usually the half of the width and height of the drawn point.
{String} type
A string describing the point's face. This method only accepts the shortcut version of each possible face: x, +, <>, ^, v, >, <

updatePathStringPrim(element)
Builds a path data string from a JXG.Curve element. Since the path data strings heavily depend on the underlying rendering technique this method is just a stub. Although such a path string is of no use for the CanvasRenderer, this method is used there to draw a path directly.
Parameters:
element

updatePoint(el)
Updates visual appearance of the renderer element assigned to the given JXG.Point.
Parameters:
{JXG.Point} el
Reference to a JXG.Point object, that has to be updated.
See:
Point
JXG.Point
JXG.AbstractRenderer#drawPoint
JXG.AbstractRenderer#changePointStyle

updatePolygon(el)
Updates properties of a JXG.Polygon's rendering node.
Parameters:
{JXG.Polygon} el
Reference to a JXG.Polygon object, that has to be updated.
See:
Polygon
JXG.Polygon
JXG.AbstractRenderer#drawPolygon

updatePolygonPrim(node, element)
Update a polygon primitive.
Parameters:
{Node} node
{JXG.Polygon} element
A JSXGraph element of type JXG.Polygon

updateRectPrim(node, x, y, w, h)
Update a rectangle primitive. This is used only for points with face of type 'rect'.
Parameters:
{Node} node
The node yearning to be updated.
{Number} x
x coordinate of the top left vertex.
{Number} y
y coordinate of the top left vertex.
{Number} w
Width of the rectangle.
{Number} h
The rectangle's height.

updateText(el)
Updates visual properties of an already existing JXG.Text element.
Parameters:
{JXG.Text} el
Reference to an JXG.Text object, that has to be updated.
See:
Text
JXG.Text
JXG.AbstractRenderer#drawText
JXG.AbstractRenderer#drawInternalText
JXG.AbstractRenderer#updateInternalText
JXG.AbstractRenderer#updateTextStyle

updateTextStyle(el, doHighlight)
Updates font-size, color and opacity propertiey and CSS style properties of a JXG.Text node. This function is also called by highlight() and nohighlight().
Parameters:
{JXG.Text} el
Reference to the JXG.Text object, that has to be updated.
{Boolean} doHighlight
See:
Text
JXG.Text
JXG.AbstractRenderer#drawText
JXG.AbstractRenderer#drawInternalText
JXG.AbstractRenderer#updateText
JXG.AbstractRenderer#updateInternalText
JXG.AbstractRenderer#updateInternalTextStyle

updateTicks(element)
Update Ticks on a JXG.Line. This method is only a stub and has to be implemented in any descendant renderer class.
Parameters:
{JXG.Ticks} element
Reference of a ticks object that has to be updated.
See:
Line
Ticks
JXG.Line
JXG.Ticks
JXG.AbstractRenderer#drawTicks

updateTouchpoint(i, pos)
Move a specific crosshair.
Parameters:
{Number} i
Number of the crosshair to show
{Array} pos
New positon in screen coordinates

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Aug 21 2017 10:39:46 GMT+0200 (CEST)