Difference between revisions of "Texts and Transformations"

From JSXGraph Wiki
Jump to navigationJump to search
(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...)
 
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:40});
+
     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 23:41, 1 January 2011

The JavaScript code

Here is the complete code to accomplish this behaviour.