1 ## Copyright (C) 2002 Etienne Grossmann <etienne@egdn.net>
3 ## This program is free software; you can redistribute it and/or modify it under
4 ## the terms of the GNU General Public License as published by the Free Software
5 ## Foundation; either version 3 of the License, or (at your option) any later
8 ## This program is distributed in the hope that it will be useful, but WITHOUT
9 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 ## You should have received a copy of the GNU General Public License along with
14 ## this program; if not, see <http://www.gnu.org/licenses/>.
16 ## s = vrml_text(t,...)
18 ## Makes vrml Shape node representing string t
22 ## "col" , col : default = [ 0.3 0.4 0.9 ]
23 ## "size" , size : default = 1.0
24 ## "family", family : default = "SERIF".
25 ## (could also be : "TYPEWRITER", "SANS")
26 ## "style", style : default = "PLAIN".
27 ## (could also be : "BOLD", "ITALIC", "BOLDITALIC")
28 ## "justify", justify : default = "MIDDLE"
29 ## (could also be "FIRST", "BEGIN", "END")
31 function s = vrml_text(t,varargin)
40 filename = "vrml_text" ;
42 op1 = " col size family justify style " ;
45 df = tars (col, size, family, justify, style, verbose);
47 s = read_options (varargin, "op1",op1,"op0",op0, "default",df);
55 s = sprintf (["Shape {\n",\
56 " appearance Appearance {\n",\
57 " material Material {\n",\
58 " diffuseColor %8.3f %8.3f %8.3f\n",\
59 " emissiveColor %8.3f %8.3f %8.3f\n",\
62 " geometry Text {\n",\
64 " fontStyle FontStyle {\n",\