How to manipulate Canvas elements: Difference between revisions

Jump to navigation Jump to search
Line 104: Line 104:
|| [[File:Plot2D.rectangle and grid.png|thumb]]
|| [[File:Plot2D.rectangle and grid.png|thumb]]
|}<hr/>
|}<hr/>
=== text ===
'''parameters''': (group, text, size, origin=nil, color="#0", align="left-baseline")
Plots a text as <'''group'''>'s child.
* '''text''' the text itself as string.
* '''size''' font size and aspect as [<size-px>,<height/width>].
* '''origin''' optional as [x,y] in pixels, [0,0] by default.
* '''color''' optional font color as [r,g,b] or "#rrggbb". Black  by default.
* '''align''' optional origin reference. "left-baseline" by default.
<hr/>
=== polyline ===
=== polyline ===
  '''parameters''': (group, xSet, ySet, color="#0", symmetrical=' ')
  '''parameters''': (group, xSet, ySet, color="#0", symmetrical=' ')
Line 135: Line 144:
|| [[File:Plot2D.rectangle and grid.png|thumb]]
|| [[File:Plot2D.rectangle and grid.png|thumb]]
|}
|}
=== grid ===
#p.del();
#var p=g
#p.setTranslation(0,100);
#var s='yx';
#print(s[0]);
p=gca.plot2D.redim(p,[1.2,1.2],'center-bottom');
229

edits

Navigation menu