14.03.2014 Views

Scripting Guide - SAS

Scripting Guide - SAS

Scripting Guide - SAS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

450 Three-Dimensional Scenes Chapter 13<br />

Drawing Text<br />

Text( horz, vert, size, string, )<br />

• horz can be Left, Center, or Right justification.<br />

• vert can be Top, Middle, Baseline, or Bottom justification.<br />

• size represents the height of a capital letter M in model coordinates.<br />

• string is the text to draw.<br />

• billboard is an optional argument that causes the text to rotate with the model. Text with this option<br />

always faces the viewer.<br />

The font is always the JMP Text font. You can change the text font from the preferences menu, but because<br />

of the way JMP caches fonts for scenes, changes might not take effect until JMP is restarted.<br />

Note: Text is not part of the standard OpenGL definition.<br />

Using Text with Rotate and Translate<br />

The following example uses the text command in conjunction with the Translate and Rotate<br />

commands.<br />

/* make a scene box...holds an OpenGL scene */<br />

scene = SceneBox( 600, 600 );<br />

/* put the scene in a window */<br />

NewWindow( "Example 2", scene );<br />

scene

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!