From JSXGraph Wiki
Revision as of 22:50, 1 January 2011 by A WASSERMANN (talk | contribs)
Jump to navigationJump to search

Static image

The JavaScript code

Images can be included with the command

var im = brd.create('image',[urlImg, [-1,-1], [2*2.67181,2] ]);

It has the parameters:

  • urlImage: URL of the image. Data URLs are possible, but will not beshown in the Internet Explorer <8 and are restricted to max. 32kByte in the Internet Explorer 8.
  • [x,y]: position of the lower left corner of the image.
  • [w,h]: width and height of the image.
var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-5,5,5,-5],axis:true});
var urlImg = "";
var im = brd.create('image',[urlImg, [-1,-1], [3,3] ]);

Dynamic image