[Index for tmp_for_tar/vrml.doc] [Return to Master Index]

vrml_text

(tmp_for_tar/vrml.doc/vrml_text.m)


Function Synopsis

s = vrml_text(t,...) 

Help text

       s = vrml_text(t,...) 

 Makes vrml Shape node representing string t

 Options : 

 "col" , col             : default = [ 0.3 0.4 0.9 ]
 "size" , size           : default = 1.0
 "family", family        : default = "SERIF". 
                           (could also be : "TYPEWRITER", "SANS")
 "style", style          : default = "PLAIN". 
                           (could also be : "BOLD", "ITALIC", "BOLDITALIC")
 "justify", justify      : default = "MIDDLE"
                           (could also be "FIRST", "BEGIN", "END")

 Last modified: December 2000



Listing of function file tmp_for_tar/vrml.doc/vrml_text.m

##       s = vrml_text(t,...) 
##
## Makes vrml Shape node representing string t
## 
## Options : 
##
## "col" , col             : default = [ 0.3 0.4 0.9 ]
## "size" , size           : default = 1.0
## "family", family        : default = "SERIF". 
##                           (could also be : "TYPEWRITER", "SANS")
## "style", style          : default = "PLAIN". 
##                           (could also be : "BOLD", "ITALIC", "BOLDITALIC")
## "justify", justify      : default = "MIDDLE"
##                           (could also be "FIRST", "BEGIN", "END")

## Author:        Etienne Grossmann  <etienne@isr.ist.utl.pt>
## Last modified: December 2000

function s = vrml_text(t,...) 

size    = 1.0 ;
col     = [0.3,0.4,0.9] ;
family  = "SERIF" ;
justify = "MIDDLE" ;
style   = "PLAIN" ;

verbose = 0 ;
opt1 = " col size family justify style " ;
opt0 = " verbose " ;
nargin-- ;

filename = "vrml_text" ;

read_options 

s = sprintf (["Shape {\n",\
	      "  appearance Appearance {\n",\
	      "    material Material {\n",\
	      "      diffuseColor  %8.3f %8.3f %8.3f\n",\
	      "      emissiveColor %8.3f %8.3f %8.3f\n",\
	      "    }\n",\
	      "  }\n",\
	      "  geometry Text {\n",\
	      "    string "%s"\n"\
	      "    fontStyle FontStyle {\n",\
	      "      family  "%s"\n",\
	      "      justify "%s"\n",\
	      "      style   "%s"\n",\
	      "      size     %-8.3f\n",\
	      "    }\n",\
	      "  }\n",\
	      "}\n",\
	      ],\
	     col,\
	     col,\
	     t,\
	     family,\
	     justify,\
	     style,\
	     size\
	     );


Produced by oct2html on Sat Dec 2 19:08:39 2000
Cross-Directory links are: ON