source: trunk/SRC/Documentation/idldoc_html_output/ToBeReviewed/STRING/str_size.html @ 402

Last change on this file since 402 was 402, checked in by smasson, 15 years ago

update documentation

File size: 6.2 KB
Line 
1
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
5<!-- Generated by IDLdoc 2.0 -->
6
7<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
8  <head>
9    <title>str_size.pro (SAXO Documentation)</title>
10
11   
12    <link rel="stylesheet" type="text/css" media="all" href="./../../main_files.css" />
13    <link rel="stylesheet" type="text/css" media="print" href="./../../main_files_print.css" />
14   
15
16    <script type="text/javascript">
17      function setTitle() {
18        parent.document.title="str_size.pro (SAXO Documentation)";
19      }
20    </script>
21  </head>
22
23  <body onload="setTitle();">
24
25    <div id="navbar_title">
26  <h1>SAXO Documentation</h1>
27</div>
28
29
30<div id="main_navbar">
31
32  <table cellspacing="0">
33    <tr>
34     
35      <td><a href="./../../overview.html" title="Overview of library">Overview</a></td>
36     
37
38     
39      <td >Directory</td>
40     
41
42     
43      <td><a href="./../../idldoc-categories.html" title="Browse library by category">Categories</a></td>
44     
45
46     
47      <td><a href="./../../idldoc-index.html" title="Index of files, routines, and parameters">Index</a></td>
48     
49
50     
51      <td><a href="./../../search-page.html" title="Search library">Search</a></td>
52     
53
54      <td id="selected">File</td>
55
56     
57      <td><a href="../../../../ToBeReviewed/STRING//str_size.pro" title="Source code of a file">Source</a></td>
58     
59
60     
61      <td><a href="./../../idldoc-help.html" title="Help on IDLdoc">Help</a></td>
62     
63
64      <td >Etc</td>
65
66      <td id="flexible">Developer&nbsp;documentation</td>
67    </tr>
68  </table>
69
70</div>
71
72<div id="secondary_navbar">
73
74<a href="putfile.html">&lt;&lt;prev file</a> | <a href="string2struct.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="str_size.html" target="_TOP">view single page</a> | <a href="./../../index.html" target="_TOP">view frames</a>&nbsp;&nbsp;&nbsp;&nbsp;summary: fields | routine&nbsp;&nbsp;&nbsp;&nbsp;details: <a href="#routine_details">routine</a>
75
76</div>
77
78
79    <div id="container">
80
81      <h1 class="directory"><a href="directory-overview.html">ToBeReviewed/STRING/</a></h1>
82      <h2 class="pro_file">str_size.pro</h2>
83
84      <div id="file_attr">
85        <dl>
86        </dl>
87      </div>
88
89      <div id="file_comments">
90 The purpose of this function is to return the proper
91 character size to make a specified string a specified
92 width in a window. The width is specified in normalized
93 coordinates. The function is extremely useful for sizing
94 strings and labels in resizeable graphics windows.
95</div>
96
97     
98
99     
100
101     
102
103     
104
105      <div id="routine_details">
106       
107
108        <div class="routine_details" id="_str_size">
109
110          <h2><a class="top" href="#container">top</a>str_size <span class="categories">
111 Graphics, Widget
112</span></h2>
113       
114          <p class="header">
115            <span class="result">result = </span>str_size(<span class="result"><a href="#_str_size_param_string">string</a>[, <a href="#_str_size_param_targetwidth">targetwidth</a>]</span>, <a href="#_str_size_keyword_INITSIZE">INITSIZE</a>=<span class="result">INITSIZE</span>, <a href="#_str_size_keyword_STEP">STEP</a>=<span class="result">STEP</span>)</p>
116       
117          <div class="comments">
118</div>
119
120          <h3>Return value</h3><div class="preformat">
121 thisCharSize. This is the size the specified string should be set
122 to if you want to produce output of the specified target
123 width. The value is in standard character size units where
124 1.0 is the standard character size.
125</div>
126
127         
128            <h3>Parameters</h3>
129       
130           
131            <h4 id="_str_size_param_string">string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
132              <span class="attr">in</span>
133             
134             
135              <span class="attr">required</span>
136             
137             
138             
139             
140            </h4>
141       
142          <div class="comments">
143 This is the string that you want to make a specified
144 target size or width.
145</div>
146           
147            <h4 id="_str_size_param_targetwidth">targetwidth&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
148              <span class="attr">in</span>
149             
150              <span class="attr">optional</span>
151             
152             
153             
154              <span class="attr">default:</span> <span class="value">0.25</span>
155             
156            </h4>
157       
158          <div class="comments">
159 This is the target width of the string in normalized
160 coordinates in the current graphics window. The character
161 size of the string (returned as thisCharSize) will be
162 calculated to get the string width as close as possible to
163 the target width.
164</div>
165           
166
167         
168
169         
170
171            <h3>Keywords</h3>
172           
173            <h4 id="_str_size_keyword_INITSIZE">INITSIZE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
174             
175             
176             
177             
178             
179             
180              <span class="attr">default:</span> <span class="value">1.0</span>
181             
182            </h4>
183       
184            <div class="comments">
185 This is the initial size of the string. Default is 1.0.
186</div>
187           
188            <h4 id="_str_size_keyword_STEP">STEP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
189             
190             
191             
192             
193             
194             
195              <span class="attr">default:</span> <span class="value">0.05</span>
196             
197            </h4>
198       
199            <div class="comments">
200 This is the amount the string size will change in each step
201 of the interactive process of calculating the string size.
202</div>
203           
204         
205
206          <h3>Examples</h3><div class="preformat">
207 To make the string "Happy Holidays" take up 30% of the width of
208 the current graphics window, type this:
209
210   IDL> XYOUTS, 0.5, 0.5, ALIGN=0.5, "Happy Holidays", $
211        CHARSIZE=STR_SIZE("Happy Holidays", 0.3)
212</div>
213          <h3>Version history</h3>
214         
215          <h4>Version</h4><div class="preformat">
216 $Id: str_size.pro 372 2008-08-08 12:31:53Z pinsard $
217</div>
218          <h4>History</h4><div class="preformat">
219 Written by: David Fanning, 17 DEC 96.
220 Added a scaling factor to take into account the aspect ratio
221 of the window in determining the character size. 28 Oct 97. DWF
222</div>
223         
224         
225         
226         
227         
228         
229         
230       
231         
232         
233         
234         
235         
236         
237         
238       
239          <h3>Statistics</h3>
240          <table class="statistics">
241            <tr><td>McCabe cyclic</td><td>          11</td></tr>
242            <tr><td>McCabe essential</td><td>           1</td></tr>
243            <tr><td>McCabe modular design</td><td>           1</td></tr>
244          </table>
245         
246       
247        </div>
248       
249      </div>
250
251     
252
253      <div id="tagline">Produced by IDLdoc 2.0.</div>
254
255    </div>
256
257  </body>
258</html>
Note: See TracBrowser for help on using the repository browser.