1 /*
  2     Copyright 2008-2021
  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 or hides an 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          * @param {Boolean} value true to show the element, false to hide the element.
492          */
493         display: function (element, value) {
494             if (element) {
495                 element.visPropOld.visible = value;
496             }
497         },
498 
499         /**
500          * Shows a hidden element on the canvas; Only a stub, requires implementation in the derived renderer.
501          *
502          * Please use JXG.AbstractRenderer#display instead
503          * @param {JXG.GeometryElement} element Reference to the object that has to appear.
504          * @see JXG.AbstractRenderer#hide
505          * @deprecated
506          */
507         show: function (element) { /* stub */ },
508 
509         /**
510          * Hides an element on the canvas; Only a stub, requires implementation in the derived renderer.
511          *
512          * Please use JXG.AbstractRenderer#display instead
513          * @param {JXG.GeometryElement} element Reference to the geometry element that has to disappear.
514          * @see JXG.AbstractRenderer#show
515          * @deprecated
516          */
517         hide: function (element) { /* stub */ },
518 
519         /**
520          * Sets the buffering as recommended by SVGWG. Until now only Opera supports this and will be ignored by
521          * other browsers. Although this feature is only supported by SVG we have this method in {@link JXG.AbstractRenderer}
522          * because it is called from outside the renderer.
523          * @param {Node} node The SVG DOM Node which buffering type to update.
524          * @param {String} type Either 'auto', 'dynamic', or 'static'. For an explanation see
525          *   {@link http://www.w3.org/TR/SVGTiny12/painting.html#BufferedRenderingProperty}.
526          */
527         setBuffering: function (node, type) { /* stub */ },
528 
529         /**
530          * Sets an element's dash style.
531          * @param {JXG.GeometryElement} element An JSXGraph element.
532          */
533         setDashStyle: function (element) { /* stub */ },
534 
535         /**
536          * Puts an object into draft mode, i.e. it's visual appearance will be changed. For GEONE<sub>x</sub>T backwards compatibility.
537          * @param {JXG.GeometryElement} element Reference of the object that is in draft mode.
538          */
539         setDraft: function (element) { },
540 
541         /**
542          * Puts an object from draft mode back into normal mode.
543          * @param {JXG.GeometryElement} element Reference of the object that no longer is in draft mode.
544          */
545         removeDraft: function (element) { },
546 
547         /**
548          * Sets up nodes for rendering a gradient fill.
549          * @param element
550          */
551         setGradient: function (element) { /* stub */ },
552 
553         /**
554          * Updates the gradient fill.
555          * @param {JXG.GeometryElement} element An JSXGraph element with an area that can be filled.
556          */
557         updateGradient: function (element) { /* stub */ },
558 
559         /**
560          * Sets the transition duration (in milliseconds) for fill color and stroke
561          * color and opacity.
562          * @param {JXG.GeometryElement} element Reference of the object that wants a
563          *         new transition duration.
564          * @param {Number} duration (Optional) duration in milliseconds. If not given,
565          *        element.visProp.transitionDuration is taken. This is the default.
566          */
567         setObjectTransition: function (element, duration) { /* stub */ },
568 
569         /**
570          * Sets an objects fill color.
571          * @param {JXG.GeometryElement} element Reference of the object that wants a new fill color.
572          * @param {String} color Color in a HTML/CSS compatible format. If you don't want any fill color at all, choose 'none'.
573          * @param {Number} opacity Opacity of the fill color. Must be between 0 and 1.
574          */
575         setObjectFillColor: function (element, color, opacity) { /* stub */ },
576 
577         /**
578          * Changes an objects stroke color to the given color.
579          * @param {JXG.GeometryElement} element Reference of the {@link JXG.GeometryElement} that gets a new stroke color.
580          * @param {String} color Color value in a HTML compatible format, e.g. <strong>#00ff00</strong> or <strong>green</strong> for green.
581          * @param {Number} opacity Opacity of the fill color. Must be between 0 and 1.
582          */
583         setObjectStrokeColor: function (element, color, opacity) { /* stub */ },
584 
585         /**
586          * Sets an element's stroke width.
587          * @param {JXG.GeometryElement} element Reference to the geometry element.
588          * @param {Number} width The new stroke width to be assigned to the element.
589          */
590         setObjectStrokeWidth: function (element, width) { /* stub */ },
591 
592         /**
593          * Sets the shadow properties to a geometry element. This method is only a stub, it is implemented in the actual renderers.
594          * @param {JXG.GeometryElement} element Reference to a geometry object, that should get a shadow
595          */
596         setShadow: function (element) { /* stub */ },
597 
598         /**
599          * Highlights an object, i.e. changes the current colors of the object to its highlighting colors
600          * @param {JXG.GeometryElement} element Reference of the object that will be highlighted.
601          * @returns {JXG.AbstractRenderer} Reference to the renderer
602          */
603         highlight: function (element) { },
604 
605         /**
606          * Uses the normal colors of an object, i.e. the opposite of {@link JXG.AbstractRenderer#highlight}.
607          * @param {JXG.GeometryElement} element Reference of the object that will get its normal colors.
608          * @returns {JXG.AbstractRenderer} Reference to the renderer
609          */
610         noHighlight: function (element) { },
611 
612 
613         /* **************************
614          * renderer control
615          * **************************/
616 
617         /**
618          * Stop redraw. This method is called before every update, so a non-vector-graphics based renderer
619          * can use this method to delete the contents of the drawing panel. This is an abstract method every
620          * descendant renderer should implement, if appropriate.
621          * @see JXG.AbstractRenderer#unsuspendRedraw
622          */
623         suspendRedraw: function () { /* stub */ },
624 
625         /**
626          * Restart redraw. This method is called after updating all the rendering node attributes.
627          * @see JXG.AbstractRenderer#suspendRedraw
628          */
629         unsuspendRedraw: function () { /* stub */ },
630 
631         /**
632          * The tiny zoom bar shown on the bottom of a board (if showNavigation on board creation is true).
633          * @param {JXG.Board} board Reference to a JSXGraph board.
634          */
635         drawZoomBar: function (board) { },
636 
637         /**
638          * Wrapper for getElementById for maybe other renderers which elements are not directly accessible by DOM methods like document.getElementById().
639          * @param {String} id Unique identifier for element.
640          * @returns {Object} Reference to a JavaScript object. In case of SVG/VMLRenderer it's a reference to a SVG/VML node.
641          */
642         getElementById: function (id) {
643             return null;
644         },
645 
646         /**
647          * Resizes the rendering element
648          * @param {Number} w New width
649          * @param {Number} h New height
650          */
651         resize: function (w, h) { /* stub */},
652 
653         removeToInsertLater: function () {
654             return function () {};
655         }
656 
657     });
658 
659     JXG.NoRenderer.prototype = new AbstractRenderer();
660 
661     return JXG.NoRenderer;
662 });
663