Texts and Transformations: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) (New page: <jsxgraph with="500" height="500" box="box1"> (function(){ var brd, txt, p0, p1; JXG.Options.text.defaultDisplay = 'internal'; brd = JXG.JSXGraph.initBoard('box1', {boundi...) |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 7: | Line 7: | ||
p0 = brd.create('point', [0,0], {style:5, name:'offset'}); | p0 = brd.create('point', [0,0], {style:5, name:'offset'}); | ||
p1 = brd.create('point', [3,0], {style:5, name:'rotate+scale'}); | p1 = brd.create('point', [3,0], {style:5, name:'rotate+scale'}); | ||
txt = brd.create('text',[0,0, 'Hello World'], {fontSize: | txt = brd.create('text',[0,0, 'Hello World'], {fontSize:30}); | ||
var tOff = brd.create('transform', [function(){return p0.X()},function(){return p0.Y()}], {type:'translate'}); | var tOff = brd.create('transform', [function(){return p0.X()},function(){return p0.Y()}], {type:'translate'}); |
Revision as of 21:41, 1 January 2011
The JavaScript code
Here is the complete code to accomplish this behaviour.