[89] | 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> |
---|
[104] | 9 | <title>str_size.pro (SAXO Documentation)</title> |
---|
[89] | 10 | |
---|
| 11 | |
---|
[191] | 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" /> |
---|
[89] | 14 | |
---|
| 15 | |
---|
| 16 | <script type="text/javascript"> |
---|
| 17 | function setTitle() { |
---|
[104] | 18 | parent.document.title="str_size.pro (SAXO Documentation)"; |
---|
[89] | 19 | } |
---|
| 20 | </script> |
---|
| 21 | </head> |
---|
| 22 | |
---|
| 23 | <body onload="setTitle();"> |
---|
| 24 | |
---|
| 25 | <div id="navbar_title"> |
---|
[104] | 26 | <h1>SAXO Documentation</h1> |
---|
[89] | 27 | </div> |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | <div id="main_navbar"> |
---|
| 31 | |
---|
| 32 | <table cellspacing="0"> |
---|
| 33 | <tr> |
---|
| 34 | |
---|
[189] | 35 | <td><a href="./../../overview.html" title="Overview of library">Overview</a></td> |
---|
[89] | 36 | |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | <td >Directory</td> |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | |
---|
[189] | 43 | <td><a href="./../../idldoc-categories.html" title="Browse library by category">Categories</a></td> |
---|
[89] | 44 | |
---|
| 45 | |
---|
| 46 | |
---|
[189] | 47 | <td><a href="./../../idldoc-index.html" title="Index of files, routines, and parameters">Index</a></td> |
---|
[89] | 48 | |
---|
| 49 | |
---|
| 50 | |
---|
[189] | 51 | <td><a href="./../../search-page.html" title="Search library">Search</a></td> |
---|
[89] | 52 | |
---|
| 53 | |
---|
| 54 | <td id="selected">File</td> |
---|
| 55 | |
---|
| 56 | |
---|
[189] | 57 | <td><a href="../../../../ToBeReviewed/STRING//str_size.pro" title="Source code of a file">Source</a></td> |
---|
[89] | 58 | |
---|
| 59 | |
---|
| 60 | |
---|
[189] | 61 | <td><a href="./../../idldoc-help.html" title="Help on IDLdoc">Help</a></td> |
---|
[89] | 62 | |
---|
| 63 | |
---|
| 64 | <td >Etc</td> |
---|
| 65 | |
---|
| 66 | <td id="flexible">Developer documentation</td> |
---|
| 67 | </tr> |
---|
| 68 | </table> |
---|
| 69 | |
---|
| 70 | </div> |
---|
| 71 | |
---|
| 72 | <div id="secondary_navbar"> |
---|
| 73 | |
---|
[189] | 74 | <a href="putfile.html"><<prev file</a> | <a href="string2struct.html">next file >></a> <a href="str_size.html" target="_TOP">view single page</a> | <a href="./../../index.html" target="_TOP">view frames</a> summary: fields | routine details: <a href="#routine_details">routine</a> |
---|
[89] | 75 | |
---|
| 76 | </div> |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | <div id="container"> |
---|
| 80 | |
---|
[189] | 81 | <h1 class="directory"><a href="directory-overview.html">ToBeReviewed/STRING/</a></h1> |
---|
[89] | 82 | <h2 class="pro_file">str_size.pro</h2> |
---|
| 83 | |
---|
| 84 | <div id="file_attr"> |
---|
| 85 | <dl> |
---|
| 86 | </dl> |
---|
| 87 | </div> |
---|
| 88 | |
---|
[142] | 89 | <div id="file_comments"> |
---|
| 90 | The purpose of this function is to return the proper |
---|
[163] | 91 | character size to make a specified string a specified |
---|
[142] | 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> |
---|
[89] | 96 | |
---|
| 97 | |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | |
---|
| 101 | |
---|
| 102 | |
---|
| 103 | |
---|
| 104 | |
---|
| 105 | <div id="routine_details"> |
---|
| 106 | |
---|
| 107 | |
---|
[163] | 108 | <div class="routine_details" id="_str_size"> |
---|
[89] | 109 | |
---|
[163] | 110 | <h2><a class="top" href="#container">top</a>str_size <span class="categories"> |
---|
[157] | 111 | Graphics, Widget |
---|
[142] | 112 | </span></h2> |
---|
[89] | 113 | |
---|
| 114 | <p class="header"> |
---|
[290] | 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> |
---|
[89] | 116 | |
---|
| 117 | <div class="comments"> |
---|
[142] | 118 | </div> |
---|
[89] | 119 | |
---|
[234] | 120 | <h3>Return value</h3><div class="preformat"> |
---|
[142] | 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> |
---|
[89] | 126 | |
---|
| 127 | |
---|
| 128 | <h3>Parameters</h3> |
---|
| 129 | |
---|
| 130 | |
---|
[163] | 131 | <h4 id="_str_size_param_string">string |
---|
[142] | 132 | <span class="attr">in</span> |
---|
[89] | 133 | |
---|
| 134 | |
---|
[142] | 135 | <span class="attr">required</span> |
---|
[89] | 136 | |
---|
| 137 | |
---|
| 138 | |
---|
| 139 | |
---|
| 140 | </h4> |
---|
| 141 | |
---|
[142] | 142 | <div class="comments"> |
---|
[163] | 143 | This is the string that you want to make a specified |
---|
[142] | 144 | target size or width. |
---|
| 145 | </div> |
---|
[89] | 146 | |
---|
[290] | 147 | <h4 id="_str_size_param_targetwidth">targetwidth |
---|
[142] | 148 | <span class="attr">in</span> |
---|
[89] | 149 | |
---|
[142] | 150 | <span class="attr">optional</span> |
---|
[89] | 151 | |
---|
| 152 | |
---|
| 153 | |
---|
[163] | 154 | <span class="attr">default:</span> <span class="value">0.25</span> |
---|
[89] | 155 | |
---|
| 156 | </h4> |
---|
| 157 | |
---|
[142] | 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] | 163 | the target width. |
---|
[142] | 164 | </div> |
---|
[89] | 165 | |
---|
| 166 | |
---|
| 167 | |
---|
| 168 | |
---|
| 169 | |
---|
| 170 | |
---|
| 171 | <h3>Keywords</h3> |
---|
| 172 | |
---|
[163] | 173 | <h4 id="_str_size_keyword_INITSIZE">INITSIZE |
---|
[89] | 174 | |
---|
| 175 | |
---|
| 176 | |
---|
| 177 | |
---|
| 178 | |
---|
| 179 | |
---|
[163] | 180 | <span class="attr">default:</span> <span class="value">1.0</span> |
---|
[89] | 181 | |
---|
| 182 | </h4> |
---|
| 183 | |
---|
[234] | 184 | <div class="comments"> |
---|
[142] | 185 | This is the initial size of the string. Default is 1.0. |
---|
| 186 | </div> |
---|
[89] | 187 | |
---|
[163] | 188 | <h4 id="_str_size_keyword_STEP">STEP |
---|
[89] | 189 | |
---|
| 190 | |
---|
| 191 | |
---|
| 192 | |
---|
| 193 | |
---|
| 194 | |
---|
[163] | 195 | <span class="attr">default:</span> <span class="value">0.05</span> |
---|
[89] | 196 | |
---|
| 197 | </h4> |
---|
| 198 | |
---|
[142] | 199 | <div class="comments"> |
---|
| 200 | This is the amount the string size will change in each step |
---|
[163] | 201 | of the interactive process of calculating the string size. |
---|
[142] | 202 | </div> |
---|
[89] | 203 | |
---|
| 204 | |
---|
| 205 | |
---|
[142] | 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 | |
---|
[402] | 210 | IDL> XYOUTS, 0.5, 0.5, ALIGN=0.5, "Happy Holidays", $ |
---|
| 211 | CHARSIZE=STR_SIZE("Happy Holidays", 0.3) |
---|
[142] | 212 | </div> |
---|
| 213 | <h3>Version history</h3> |
---|
[89] | 214 | |
---|
[142] | 215 | <h4>Version</h4><div class="preformat"> |
---|
[402] | 216 | $Id: str_size.pro 372 2008-08-08 12:31:53Z pinsard $ |
---|
[142] | 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 |
---|
[234] | 221 | of the window in determining the character size. 28 Oct 97. DWF |
---|
[142] | 222 | </div> |
---|
[89] | 223 | |
---|
| 224 | |
---|
| 225 | |
---|
| 226 | |
---|
| 227 | |
---|
| 228 | |
---|
| 229 | |
---|
| 230 | |
---|
| 231 | |
---|
| 232 | |
---|
| 233 | |
---|
| 234 | |
---|
| 235 | |
---|
| 236 | |
---|
| 237 | |
---|
| 238 | |
---|
[163] | 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> |
---|
[89] | 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> |
---|
[249] | 258 | </html> |
---|