      1 /*
      2     Copyright 2008-2013
      3         Matthias Ehmann,
      4         Michael Gerhaeuser,
      5         Carsten Miller,
      6         Bianca Valentin,
      7         Alfred Wassermann,
      8         Peter Wilfahrt
      9
     10     This file is part of JSXGraph.
     11
     12     JSXGraph is free software dual licensed under the GNU LGPL or MIT License.
     13
     14     You can redistribute it and/or modify it under the terms of the
     15
     16       * GNU Lesser General Public License as published by
     17         the Free Software Foundation, either version 3 of the License, or
     18         (at your option) any later version
     19       OR
     20       * MIT License: https://github.com/jsxgraph/jsxgraph/blob/master/LICENSE.MIT
     21
     22     JSXGraph is distributed in the hope that it will be useful,
     23     but WITHOUT ANY WARRANTY; without even the implied warranty of
     24     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     25     GNU Lesser General Public License for more details.
     26
     27     You should have received a copy of the GNU Lesser General Public License and
     28     the MIT License along with JSXGraph. If not, see <http://www.gnu.org/licenses/>
     29     and <http://opensource.org/licenses/MIT/>.
     30  */
     31
     32
     33 /*global JXG: true, define: true, AMprocessNode: true, MathJax: true, document: true */
     34 /*jslint nomen: true, plusplus: true, newcap:true*/
     35
     36 /* depends:
     37  jxg
     38  renderer/abstract
     39 */
     40
     41 /**
     42  * @fileoverview JSXGraph can use various technologies to render the contents of a construction, e.g.
     43  * SVG, VML, and HTML5 Canvas. To accomplish this, The rendering and the logic and control mechanisms
     44  * are completely separated from each other. Every rendering technology has it's own class, called
     45  * Renderer, e.g. SVGRenderer for SVG, the same for VML and Canvas. The common base for all available
     46  * renderers is the class AbstractRenderer.
     47  */
     48
     49 define(['jxg', 'renderer/abstract'], function (JXG, AbstractRenderer) {
     50
     51     "use strict";
     52
     53     /**
     54      * This renderer draws nothing. It is intended to be used in environments where none of our rendering engines
     55      * are available, e.g. WebWorkers.
     56      * @class JXG.AbstractRenderer
     57      */
     58     JXG.NoRenderer = function () {
     59         /**
     60          * If this property is set to <tt>true</tt> the visual properties of the elements are updated
     61          * on every update. Visual properties means: All the stuff stored in the
     62          * {@link JXG.GeometryElement#visProp} property won't be set if enhancedRendering is <tt>false</tt>
     63          * @type Boolean
     64          * @default true
     65          */
     66         this.enhancedRendering = false;
     67
     68         /**
     69          * This is used to easily determine which renderer we are using
     70          * @example if (board.renderer.type === 'vml') {
     71          *     // do something
     72          * }
     73          * @type String
     74          */
     75         this.type = 'no';
     76     };
     77
     78     JXG.extend(JXG.NoRenderer.prototype, /** @lends JXG.AbstractRenderer.prototype */ {
     79         /* ******************************** *
     80          *    Point drawing and updating    *
     81          * ******************************** */
     82
     83         /**
     84          * Draws a point on the {@link JXG.Board}.
     85          * @param {JXG.Point} element Reference to a {@link JXG.Point} object that has to be drawn.
     86          * @see Point
     87          * @see JXG.Point
     88          * @see JXG.AbstractRenderer#updatePoint
     89          * @see JXG.AbstractRenderer#changePointStyle
     90          */
     91         drawPoint: function (element) {},
     92
     93         /**
     94          * Updates visual appearance of the renderer element assigned to the given {@link JXG.Point}.
     95          * @param {JXG.Point} element Reference to a {@link JXG.Point} object, that has to be updated.
     96          * @see Point
     97          * @see JXG.Point
     98          * @see JXG.AbstractRenderer#drawPoint
     99          * @see JXG.AbstractRenderer#changePointStyle
    100          */
    101         updatePoint: function (element) { },
    102
    103         /**
    104          * Changes the style of a {@link JXG.Point}. This is required because the point styles differ in what
    105          * elements have to be drawn, e.g. if the point is marked by a "x" or a "+" two lines are drawn, if
    106          * it's marked by spot a circle is drawn. This method removes the old renderer element(s) and creates
    107          * the new one(s).
    108          * @param {JXG.Point} element Reference to a {@link JXG.Point} object, that's style is changed.
    109          * @see Point
    110          * @see JXG.Point
    111          * @see JXG.AbstractRenderer#updatePoint
    112          * @see JXG.AbstractRenderer#drawPoint
    113          */
    114         changePointStyle: function (element) { },
    115
    116         /* ******************************** *
    117          *           Lines                  *
    118          * ******************************** */
    119
    120         /**
    121          * Draws a line on the {@link JXG.Board}.
    122          * @param {JXG.Line} element Reference to a line object, that has to be drawn.
    123          * @see Line
    124          * @see JXG.Line
    125          * @see JXG.AbstractRenderer#updateLine
    126          */
    127         drawLine: function (element) { },
    128
    129         /**
    130          * Updates visual appearance of the renderer element assigned to the given {@link JXG.Line}.
    131          * @param {JXG.Line} element Reference to the {@link JXG.Line} object that has to be updated.
    132          * @see Line
    133          * @see JXG.Line
    134          * @see JXG.AbstractRenderer#drawLine
    135          */
    136         updateLine: function (element) { },
    137
    138         /**
    139          * Creates a rendering node for ticks added to a line.
    140          * @param {JXG.Line} element A arbitrary line.
    141          * @see Line
    142          * @see Ticks
    143          * @see JXG.Line
    144          * @see JXG.Ticks
    145          * @see JXG.AbstractRenderer#updateTicks
    146          */
    147         drawTicks: function (element) { },
    148
    149         /**
    150          * Update {@link Ticks} on a {@link JXG.Line}. This method is only a stub and has to be implemented
    151          * in any descendant renderer class.
    152          * @param {JXG.Line} element Reference of an line object, thats ticks have to be updated.
    153          * @see Line
    154          * @see Ticks
    155          * @see JXG.Line
    156          * @see JXG.Ticks
    157          * @see JXG.AbstractRenderer#drawTicks
    158          */
    159         updateTicks: function (element) { /* stub */ },
    160
    161         /* **************************
    162          *    Curves
    163          * **************************/
    164
    165         /**
    166          * Draws a {@link JXG.Curve} on the {@link JXG.Board}.
    167          * @param {JXG.Curve} element Reference to a graph object, that has to be plotted.
    168          * @see Curve
    169          * @see JXG.Curve
    170          * @see JXG.AbstractRenderer#updateCurve
    171          */
    172         drawCurve: function (element) { },
    173
    174         /**
    175          * Updates visual appearance of the renderer element assigned to the given {@link JXG.Curve}.
    176          * @param {JXG.Curve} element Reference to a {@link JXG.Curve} object, that has to be updated.
    177          * @see Curve
    178          * @see JXG.Curve
    179          * @see JXG.AbstractRenderer#drawCurve
    180          */
    181         updateCurve: function (element) { },
    182
    183         /* **************************
    184          *    Circle related stuff
    185          * **************************/
    186
    187         /**
    188          * Draws a {@link JXG.Circle}
    189          * @param {JXG.Circle} element Reference to a {@link JXG.Circle} object that has to be drawn.
    190          * @see Circle
    191          * @see JXG.Circle
    192          * @see JXG.AbstractRenderer#updateEllipse
    193          */
    194         drawEllipse: function (element) { },
    195
    196         /**
    197          * Updates visual appearance of a given {@link JXG.Circle} on the {@link JXG.Board}.
    198          * @param {JXG.Circle} element Reference to a {@link JXG.Circle} object, that has to be updated.
    199          * @see Circle
    200          * @see JXG.Circle
    201          * @see JXG.AbstractRenderer#drawEllipse
    202          */
    203         updateEllipse: function (element) { },
    204
    205
    206         /* **************************
    207          *   Polygon related stuff
    208          * **************************/
    209
    210         /**
    211          * Draws a {@link JXG.Polygon} on the {@link JXG.Board}.
    212          * @param {JXG.Polygon} element Reference to a Polygon object, that is to be drawn.
    213          * @see Polygon
    214          * @see JXG.Polygon
    215          * @see JXG.AbstractRenderer#updatePolygon
    216          */
    217         drawPolygon: function (element) { },
    218
    219         /**
    220          * Updates properties of a {@link JXG.Polygon}'s rendering node.
    221          * @param {JXG.Polygon} element Reference to a {@link JXG.Polygon} object, that has to be updated.
    222          * @see Polygon
    223          * @see JXG.Polygon
    224          * @see JXG.AbstractRenderer#drawPolygon
    225          */
    226         updatePolygon: function (element) { },
    227
    228         /* **************************
    229          *    Text related stuff
    230          * **************************/
    231
    232         /**
    233          * Shows a small copyright notice in the top left corner of the board.
    234          * @param {String} str The copyright notice itself
    235          * @param {Number} fontsize Size of the font the copyright notice is written in
    236          */
    237         displayCopyright: function (str, fontsize) { /* stub */ },
    238
    239         /**
    240          * An internal text is a {@link JXG.Text} element which is drawn using only
    241          * the given renderer but no HTML. This method is only a stub, the drawing
    242          * is done in the special renderers.
    243          * @param {JXG.Text} element Reference to a {@link JXG.Text} object
    244          * @see Text
    245          * @see JXG.Text
    246          * @see JXG.AbstractRenderer#updateInternalText
    247          * @see JXG.AbstractRenderer#drawText
    248          * @see JXG.AbstractRenderer#updateText
    249          * @see JXG.AbstractRenderer#updateTextStyle
    250          */
    251         drawInternalText: function (element) { /* stub */ },
    252
    253         /**
    254          * Updates visual properties of an already existing {@link JXG.Text} element.
    255          * @param {JXG.Text} element Reference to an {@link JXG.Text} object, that has to be updated.
    256          * @see Text
    257          * @see JXG.Text
    258          * @see JXG.AbstractRenderer#drawInternalText
    259          * @see JXG.AbstractRenderer#drawText
    260          * @see JXG.AbstractRenderer#updateText
    261          * @see JXG.AbstractRenderer#updateTextStyle
    262          */
    263         updateInternalText: function (element) { /* stub */ },
    264
    265         /**
    266          * Displays a {@link JXG.Text} on the {@link JXG.Board} by putting a HTML div over it.
    267          * @param {JXG.Text} element Reference to an {@link JXG.Text} object, that has to be displayed
    268          * @see Text
    269          * @see JXG.Text
    270          * @see JXG.AbstractRenderer#drawInternalText
    271          * @see JXG.AbstractRenderer#updateText
    272          * @see JXG.AbstractRenderer#updateInternalText
    273          * @see JXG.AbstractRenderer#updateTextStyle
    274          */
    275         drawText: function (element) { },
    276
    277         /**
    278          * Updates visual properties of an already existing {@link JXG.Text} element.
    279          * @param {JXG.Text} element Reference to an {@link JXG.Text} object, that has to be updated.
    280          * @see Text
    281          * @see JXG.Text
    282          * @see JXG.AbstractRenderer#drawText
    283          * @see JXG.AbstractRenderer#drawInternalText
    284          * @see JXG.AbstractRenderer#updateInternalText
    285          * @see JXG.AbstractRenderer#updateTextStyle
    286          */
    287         updateText: function (element) { },
    288
    289         /**
    290          * Updates CSS style properties of a {@link JXG.Text} node.
    291          * @param {JXG.Text} element Reference to the {@link JXG.Text} object, that has to be updated.
    292          * @param {Boolean} doHighlight
    293          * @see Text
    294          * @see JXG.Text
    295          * @see JXG.AbstractRenderer#drawText
    296          * @see JXG.AbstractRenderer#drawInternalText
    297          * @see JXG.AbstractRenderer#updateText
    298          * @see JXG.AbstractRenderer#updateInternalText
    299          */
    300         updateTextStyle: function (element, doHighlight) { },
    301
    302         /**
    303          * Set color and opacity of internal texts.
    304          * SVG needs its own version.
    305          * @private
    306          * @see JXG.AbstractRenderer#updateTextStyle
    307          * @see JXG.AbstractRenderer#updateInternalTextStyle
    308          */
    309         updateInternalTextStyle: function (element, strokeColor, strokeOpacity) { /* stub */ },
    310
    311         /* **************************
    312          *    Image related stuff
    313          * **************************/
    314
    315         /**
    316          * Draws an {@link JXG.Image} on a board; This is just a template that has to be implemented by special renderers.
    317          * @param {JXG.Image} element Reference to the image object that is to be drawn
    318          * @see Image
    319          * @see JXG.Image
    320          * @see JXG.AbstractRenderer#updateImage
    321          */
    322         drawImage: function (element) { /* stub */ },
    323
    324         /**
    325          * Updates the properties of an {@link JXG.Image} element.
    326          * @param {JXG.Image} element Reference to an {@link JXG.Image} object, that has to be updated.
    327          * @see Image
    328          * @see JXG.Image
    329          * @see JXG.AbstractRenderer#drawImage
    330          */
    331         updateImage: function (element) { },
    332
    333         /**
    334          * Applies transformations on images and text elements. This method is just a stub and has to be implemented in all
    335          * descendant classes where text and image transformations are to be supported.
    336          * @param {JXG.Image|JXG.Text} element A {@link JXG.Image} or {@link JXG.Text} object.
    337          * @param {Array} transformations An array of {@link JXG.Transformation} objects. This is usually the transformations property
    338          * of the given element <tt>el</tt>.
    339          */
    340         transformImage: function (element, transformations) { /* stub */ },
    341
    342         /**
    343          * If the URL of the image is provided by a function the URL has to be updated during updateImage()
    344          * @param {JXG.Image} element Reference to an image object.
    345          * @see JXG.AbstractRenderer#updateImage
    346          */
    347         updateImageURL: function (element) { /* stub */ },
    348
    349         /* **************************
    350          * Render primitive objects
    351          * **************************/
    352
    353         /**
    354          * Appends a node to a specific layer level. This is just an abstract method and has to be implemented
    355          * in all renderers that want to use the <tt>createPrim</tt> model to draw.
    356          * @param {Node} node A DOM tree node.
    357          * @param {Number} level The layer the node is attached to. This is the index of the layer in
    358          * {@link JXG.SVGRenderer#layer} or the <tt>z-index</tt> style property of the node in VMLRenderer.
    359          */
    360         appendChildPrim: function (node, level) { /* stub */ },
    361
    362         /**
    363          * Stores the rendering nodes. This is an abstract method which has to be implemented in all renderers that use
    364          * the <tt>createPrim</tt> method.
    365          * @param {JXG.GeometryElement} element A JSXGraph element.
    366          * @param {String} type The XML node name. Only used in VMLRenderer.
    367          */
    368         appendNodesToElement: function (element, type) { /* stub */ },
    369
    370         /**
    371          * Creates a node of a given type with a given id.
    372          * @param {String} type The type of the node to create.
    373          * @param {String} id Set the id attribute to this.
    374          * @returns {Node} Reference to the created node.
    375          */
    376         createPrim: function (type, id) {
    377             /* stub */
    378             return null;
    379         },
    380
    381         /**
    382          * Removes an element node. Just a stub.
    383          * @param {Node} node The node to remove.
    384          */
    385         remove: function (node) { /* stub */ },
    386
    387         /**
    388          * Can be used to create the nodes to display arrows. This is an abstract method which has to be implemented
    389          * in any descendant renderer.
    390          * @param {JXG.GeometryElement} element The element the arrows are to be attached to.
    391          */
    392         makeArrows: function (element) { /* stub */ },
    393
    394         /**
    395          * Updates an ellipse node primitive. This is an abstract method which has to be implemented in all renderers
    396          * that use the <tt>createPrim</tt> method.
    397          * @param {Node} node Reference to the node.
    398          * @param {Number} x Centre X coordinate
    399          * @param {Number} y Centre Y coordinate
    400          * @param {Number} rx The x-axis radius.
    401          * @param {Number} ry The y-axis radius.
    402          */
    403         updateEllipsePrim: function (node, x, y, rx, ry) { /* stub */ },
    404
    405         /**
    406          * Refreshes a line node. This is an abstract method which has to be implemented in all renderers that use
    407          * the <tt>createPrim</tt> method.
    408          * @param {Node} node The node to be refreshed.
    409          * @param {Number} p1x The first point's x coordinate.
    410          * @param {Number} p1y The first point's y coordinate.
    411          * @param {Number} p2x The second point's x coordinate.
    412          * @param {Number} p2y The second point's y coordinate.
    413          * @param {JXG.Board} board
    414          */
    415         updateLinePrim: function (node, p1x, p1y, p2x, p2y, board) { /* stub */ },
    416
    417         /**
    418          * Updates a path element. This is an abstract method which has to be implemented in all renderers that use
    419          * the <tt>createPrim</tt> method.
    420          * @param {Node} node The path node.
    421          * @param {String} pathString A string formatted like e.g. <em>'M 1,2 L 3,1 L5,5'</em>. The format of the string
    422          * depends on the rendering engine.
    423          * @param {JXG.Board} board Reference to the element's board.
    424          */
    425         updatePathPrim: function (node, pathString, board) { /* stub */ },
    426
    427         /**
    428          * Builds a path data string to draw a point with a face other than <em>rect</em> and <em>circle</em>. Since
    429          * the format of such a string usually depends on the renderer this method
    430          * is only an abstract method. Therefore, it has to be implemented in the descendant renderer itself unless
    431          * the renderer does not use the createPrim interface but the draw* interfaces to paint.
    432          * @param {JXG.Point} element The point element
    433          * @param {Number} size A positive number describing the size. Usually the half of the width and height of
    434          * the drawn point.
    435          * @param {String} type A string describing the point's face. This method only accepts the shortcut version of
    436          * each possible face: <tt>x, +, <>, ^, v, >, <
    437          */
    438         updatePathStringPoint: function (element, size, type) { /* stub */ },
    439
    440         /**
    441          * Builds a path data string from a {@link JXG.Curve} element. Since the path data strings heavily depend on the
    442          * underlying rendering technique this method is just a stub. Although such a path string is of no use for the
    443          * CanvasRenderer, this method is used there to draw a path directly.
    444          * @param element
    445          */
    446         updatePathStringPrim: function (element) { /* stub */ },
    447
    448         /**
    449          * Builds a path data string from a {@link JXG.Curve} element such that the curve looks like
    450          * hand drawn.
    451          * Since the path data strings heavily depend on the
    452          * underlying rendering technique this method is just a stub. Although such a path string is of no use for the
    453          * CanvasRenderer, this method is used there to draw a path directly.
    454          * @param element
    455          */
    456         updatePathStringBezierPrim: function (element) { /* stub */ },
    457
    458
    459         /**
    460          * Update a polygon primitive.
    461          * @param {Node} node
    462          * @param {JXG.Polygon} element A JSXGraph element of type {@link JXG.Polygon}
    463          */
    464         updatePolygonPrim: function (node, element) { /* stub */ },
    465
    466         /**
    467          * Update a rectangle primitive. This is used only for points with face of type 'rect'.
    468          * @param {Node} node The node yearning to be updated.
    469          * @param {Number} x x coordinate of the top left vertex.
    470          * @param {Number} y y coordinate of the top left vertex.
    471          * @param {Number} w Width of the rectangle.
    472          * @param {Number} h The rectangle's height.
    473          */
    474         updateRectPrim: function (node, x, y, w, h) { /* stub */ },
    475
    476         /* **************************
    477          *  Set Attributes
    478          * **************************/
    479
    480         /**
    481          * Sets a node's attribute.
    482          * @param {Node} node The node that is to be updated.
    483          * @param {String} key Name of the attribute.
    484          * @param {String} val New value for the attribute.
    485          */
    486         setPropertyPrim: function (node, key, val) { /* stub */ },
    487
    488         /**
    489          * Shows a hidden element on the canvas; Only a stub, requires implementation in the derived renderer.
    490          * @param {JXG.GeometryElement} element Reference to the object that has to appear.
    491          * @see JXG.AbstractRenderer#hide
    492          */
    493         show: function (element) { /* stub */ },
    494
    495         /**
    496          * Hides an element on the canvas; Only a stub, requires implementation in the derived renderer.
    497          * @param {JXG.GeometryElement} element Reference to the geometry element that has to disappear.
    498          * @see JXG.AbstractRenderer#show
    499          */
    500         hide: function (element) { /* stub */ },
    501
    502         /**
    503          * Sets the buffering as recommended by SVGWG. Until now only Opera supports this and will be ignored by
    504          * other browsers. Although this feature is only supported by SVG we have this method in {@link JXG.AbstractRenderer}
    505          * because it is called from outside the renderer.
    506          * @param {Node} node The SVG DOM Node which buffering type to update.
    507          * @param {String} type Either 'auto', 'dynamic', or 'static'. For an explanation see
    508          *   {@link http://www.w3.org/TR/SVGTiny12/painting.html#BufferedRenderingProperty}.
    509          */
    510         setBuffering: function (node, type) { /* stub */ },
    511
    512         /**
    513          * Sets an element's dash style.
    514          * @param {JXG.GeometryElement} element An JSXGraph element.
    515          */
    516         setDashStyle: function (element) { /* stub */ },
    517
    518         /**
    519          * Puts an object into draft mode, i.e. it's visual appearance will be changed. For GEONE<sub>x</sub>T backwards compatibility.
    520          * @param {JXG.GeometryElement} element Reference of the object that is in draft mode.
    521          */
    522         setDraft: function (element) { },
    523
    524         /**
    525          * Puts an object from draft mode back into normal mode.
    526          * @param {JXG.GeometryElement} element Reference of the object that no longer is in draft mode.
    527          */
    528         removeDraft: function (element) { },
    529
    530         /**
    531          * Sets up nodes for rendering a gradient fill.
    532          * @param element
    533          */
    534         setGradient: function (element) { /* stub */ },
    535
    536         /**
    537          * Updates the gradient fill.
    538          * @param {JXG.GeometryElement} element An JSXGraph element with an area that can be filled.
    539          */
    540         updateGradient: function (element) { /* stub */ },
    541
    542         /**
    543          * Sets an objects fill color.
    544          * @param {JXG.GeometryElement} element Reference of the object that wants a new fill color.
    545          * @param {String} color Color in a HTML/CSS compatible format. If you don't want any fill color at all, choose 'none'.
    546          * @param {Number} opacity Opacity of the fill color. Must be between 0 and 1.
    547          */
    548         setObjectFillColor: function (element, color, opacity) { /* stub */ },
    549
    550         /**
    551          * Changes an objects stroke color to the given color.
    552          * @param {JXG.GeometryElement} element Reference of the {@link JXG.GeometryElement} that gets a new stroke color.
    553          * @param {String} color Color value in a HTML compatible format, e.g. <strong>#00ff00</strong> or <strong>green</strong> for green.
    554          * @param {Number} opacity Opacity of the fill color. Must be between 0 and 1.
    555          */
    556         setObjectStrokeColor: function (element, color, opacity) { /* stub */ },
    557
    558         /**
    559          * Sets an element's stroke width.
    560          * @param {JXG.GeometryElement} element Reference to the geometry element.
    561          * @param {Number} width The new stroke width to be assigned to the element.
    562          */
    563         setObjectStrokeWidth: function (element, width) { /* stub */ },
    564
    565         /**
    566          * Sets the shadow properties to a geometry element. This method is only a stub, it is implemented in the actual renderers.
    567          * @param {JXG.GeometryElement} element Reference to a geometry object, that should get a shadow
    568          */
    569         setShadow: function (element) { /* stub */ },
    570
    571         /**
    572          * Highlights an object, i.e. changes the current colors of the object to its highlighting colors
    573          * @param {JXG.GeometryElement} element Reference of the object that will be highlighted.
    574          * @returns {JXG.AbstractRenderer} Reference to the renderer
    575          */
    576         highlight: function (element) { },
    577
    578         /**
    579          * Uses the normal colors of an object, i.e. the opposite of {@link JXG.AbstractRenderer#highlight}.
    580          * @param {JXG.GeometryElement} element Reference of the object that will get its normal colors.
    581          * @returns {JXG.AbstractRenderer} Reference to the renderer
    582          */
    583         noHighlight: function (element) { },
    584
    585
    586         /* **************************
    587          * renderer control
    588          * **************************/
    589
    590         /**
    591          * Stop redraw. This method is called before every update, so a non-vector-graphics based renderer
    592          * can use this method to delete the contents of the drawing panel. This is an abstract method every
    593          * descendant renderer should implement, if appropriate.
    594          * @see JXG.AbstractRenderer#unsuspendRedraw
    595          */
    596         suspendRedraw: function () { /* stub */ },
    597
    598         /**
    599          * Restart redraw. This method is called after updating all the rendering node attributes.
    600          * @see JXG.AbstractRenderer#suspendRedraw
    601          */
    602         unsuspendRedraw: function () { /* stub */ },
    603
    604         /**
    605          * The tiny zoom bar shown on the bottom of a board (if showNavigation on board creation is true).
    606          * @param {JXG.Board} board Reference to a JSXGraph board.
    607          */
    608         drawZoomBar: function (board) { },
    609
    610         /**
    611          * Wrapper for getElementById for maybe other renderers which elements are not directly accessible by DOM methods like document.getElementById().
    612          * @param {String} id Unique identifier for element.
    613          * @returns {Object} Reference to a JavaScript object. In case of SVG/VMLRenderer it's a reference to a SVG/VML node.
    614          */
    615         getElementById: function (id) {
    616             return null;
    617         },
    618
    619         /**
    620          * Resizes the rendering element
    621          * @param {Number} w New width
    622          * @param {Number} h New height
    623          */
    624         resize: function (w, h) { /* stub */},
    625
    626         removeToInsertLater: function () {
    627             return function () {};
    628         }
    629
    630     });
    631
    632     JXG.NoRenderer.prototype = new AbstractRenderer();
    633
    634     return JXG.NoRenderer;
    635 });
    636