source: trunk/SRC/Documentation/idldoc_assistant_output/ToBeReviewed/STRING/str_size.html @ 338

Last change on this file since 338 was 338, checked in by smasson, 16 years ago

update documentation

File size: 5.0 KB
Line 
1
2
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4  <head>
5    <title>str_size.pro (SAXO Documentation Assistant)</title>
6  </head>
7
8  <body text="#000000" bgcolor="#FFFFFF">
9
10   
11<!-- Navbar template takes a structure with the following fields:
12       overview_href :
13       overview_selected :
14       dir_overview_href :
15       dir_overview_selected :
16       categories_href :
17       categories_selected :
18       index_href :
19       index_selected :
20       search_href :
21       search_selected :
22       file_selected :
23       source_href :
24       source_selected :
25       help_href :
26       help_selected :
27       etc_selected :
28
29       prev_file_href :
30       next_file_href :
31
32       view_single_page_href :
33       view_frames_href :
34
35       summary_fields_href :
36       summary_routine_href :
37       details_routine_href :
38
39       title :
40       subtitle :
41       user :
42-->
43
44
45<table border="0" cellpadding="0" cellspacing="0" width="98%" bgcolor="#F0F0FF" valign="bottom">
46  <tr>
47    <td width="10%">
48<a href="putfile.html"><img src="./../../prev.gif" border="0" alt="Previous"></a></td>
49    <td width="80%" align="center" valign="center">
50<font size=-1><i>SAXO Documentation Assistant</i>: <a href="./../../home.html">Overview</a></font></td>
51    <td width="10%" align="right">
52<a href="string2struct.html"><img src="./../../next.gif" border="0" alt="Next"></a></td>
53  </tr>
54</table>
55
56
57    <h1><font size="-2">ToBeReviewed/STRING/</font></h1>
58    <h2>str_size.pro</h2>
59
60    <dl>
61    </dl>
62
63   
64 The purpose of this function is to return the proper
65 character size to make a specified string a specified
66 width in a window. The width is specified in normalized
67 coordinates. The function is extremely useful for sizing
68 strings and labels in resizeable graphics windows.
69
70
71   
72
73     
74      <a name="#_str_size"></a>
75
76      <h2>str_size  <font size="-1" color="#006633">
77 Graphics, Widget
78</font></h2>
79
80      <p><font face="Courier"><i>result = </i>str_size(<i><a href="#_str_size_keyword_string">string</a>[, <a href="#_str_size_keyword_targetwidth">targetwidth</a>]</i>, <a href="#_str_size_keyword_INITSIZE">INITSIZE</a>=<i>INITSIZE</i>, <a href="#_str_size_keyword_STEP">STEP</a>=<i>STEP</i>)</font></p>
81
82   
83
84
85    <h3>Return value</h3>
86 thisCharSize. This is the size the specified string should be set
87 to if you want to produce output of the specified target
88 width. The value is in standard character size units where
89 1.0 is the standard character size.
90
91
92   
93    <h3>Parameters</h3>
94   
95
96    <a name="#_str_size_keyword_string"></a>
97    <h4>string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
98      <font size="-1" color="#006633">in</font>
99     
100     
101      <font size="-1" color="#006633">required</font>
102     
103     
104     
105     
106    </h4>
107
108   
109 This is the string that you want to make a specified
110 target size or width.
111
112   
113
114    <a name="#_str_size_keyword_targetwidth"></a>
115    <h4>targetwidth&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
116      <font size="-1" color="#006633">in</font>
117     
118      <font size="-1" color="#006633">optional</font>
119     
120     
121     
122      <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>0.25</i></font>
123     
124    </h4>
125
126   
127 This is the target width of the string in normalized
128 coordinates in the current graphics window. The character
129 size of the string (returned as thisCharSize) will be
130 calculated to get the string width as close as possible to
131 the target width.
132
133   
134   
135
136   
137    <h3>Keywords</h3>
138
139   
140    <a name="#_str_size_keyword_INITSIZE"></a>
141    <h4>INITSIZE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
142     
143     
144     
145     
146     
147     
148      <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>1.0</i></font>
149     
150    </h4>
151
152   
153 This is the initial size of the string. Default is 1.0.
154
155   
156    <a name="#_str_size_keyword_STEP"></a>
157    <h4>STEP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
158     
159     
160     
161     
162     
163     
164      <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>0.05</i></font>
165     
166    </h4>
167
168   
169 This is the amount the string size will change in each step
170 of the interactive process of calculating the string size.
171
172   
173   
174
175    <h3>Examples</h3><pre>
176 To make the string "Happy Holidays" take up 30% of the width of
177 the current graphics window, type this:
178
179   XYOUTS, 0.5, 0.5, ALIGN=0.5, "Happy Holidays", $
180   CHARSIZE=STR_SIZE("Happy Holidays", 0.3)
181
182    </pre><h3>Version history</h3>
183   
184    <h4>Version</h4>
185 $Id: str_size.pro 325 2007-12-06 10:04:53Z pinsard $
186
187    <h4>History</h4>
188 Written by: David Fanning, 17 DEC 96.
189 Added a scaling factor to take into account the aspect ratio
190 of the window in determining the character size. 28 Oct 97. DWF
191
192   
193
194   
195   
196   
197   
198   
199
200   
201   
202   
203   
204   
205   
206   
207
208    <font size="-3"><p>&nbsp;</p></font>
209    <hr size="1" color="#CCCCCC"/>
210     
211
212   
213
214    <p><font color="gray" size="-3">&nbsp;&nbsp;Produced by IDLdoc 2.0.</font></p>
215
216  </body>
217</html>
Note: See TracBrowser for help on using the repository browser.