Ignore:
Timestamp:
07/21/06 14:47:49 (18 years ago)
Author:
navarro
Message:

english and nicer header (2a)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/STRING/str_size.pro

    r134 r142  
     1;+ 
     2; 
     3; @file_comments 
     4; The purpose of this function is to return the proper 
     5; character size to make a specified string a specifed 
     6; width in a window. The width is specified in normalized 
     7; coordinates. The function is extremely useful for sizing 
     8; strings and labels in resizeable graphics windows. 
     9; 
     10; @categories 
     11; Graphics Programs, Widgets. 
     12; 
     13; @param STRING {in}{required} 
     14; This is the string that you want to make a specifed 
     15; target size or width. 
     16; 
     17; @param TARGETWIDTH {in}{optional} 
     18; This is the target width of the string in normalized 
     19; coordinates in the current graphics window. The character 
     20; size of the string (returned as thisCharSize) will be 
     21; calculated to get the string width as close as possible to 
     22; the target width. The default is 0.25. 
     23; 
     24; @keyword INITSIZE   
     25; This is the initial size of the string. Default is 1.0. 
     26; 
     27; @keyword STEP 
     28; This is the amount the string size will change in each step 
     29; of the interative process of calculating the string size. 
     30; The default value is 0.05. 
     31; 
     32; @returns  
     33; thisCharSize. This is the size the specified string should be set 
     34; to if you want to produce output of the specified target 
     35; width. The value is in standard character size units where 
     36; 1.0 is the standard character size. 
     37; 
     38; @examples 
     39; To make the string "Happy Holidays" take up 30% of the width of 
     40; the current graphics window, type this: 
     41; 
     42;   XYOUTS, 0.5, 0.5, ALIGN=0.5, "Happy Holidays", $ 
     43;   CHARSIZE=STR_SIZE("Happy Holidays", 0.3) 
     44; 
     45; @history 
     46; Written by: David Fanning, 17 DEC 96. 
     47; Added a scaling factor to take into account the aspect ratio 
     48; of the window in determing the character size. 28 Oct 97. DWF 
     49; 
     50; @version 
    151; $Id$ 
    2 ;+ 
    3 ; NAME: 
    4 ;  STR_SIZE 
    552; 
    6 ; PURPOSE: 
    7 ; 
    8 ;  The purpose of this function is to return the proper 
    9 ;  character size to make a specified string a specifed 
    10 ;  width in a window. The width is specified in normalized 
    11 ;  coordinates. The function is extremely useful for sizing 
    12 ;  strings and labels in resizeable graphics windows. 
    13 ; 
    14 ; CATEGORY: 
    15 ; 
    16 ;  Graphics Programs, Widgets. 
    17 ; 
    18 ; CALLING SEQUENCE: 
    19 ; 
    20 ;  thisCharSize = STR_SIZE(thisSting, targetWidth) 
    21 ; 
    22 ; INPUTS: 
    23 ; 
    24 ;  thisString:  This is the string that you want to make a specifed 
    25 ;     target size or width. 
    26 ; 
    27 ; OPTIONAL INPUTS: 
    28 ; 
    29 ;  targetWidth:  This is the target width of the string in normalized 
    30 ;     coordinates in the current graphics window. The character 
    31 ;     size of the string (returned as thisCharSize) will be 
    32 ;     calculated to get the string width as close as possible to 
    33 ;     the target width. The default is 0.25. 
    34 ; 
    35 ; KEYWORD PARAMETERS: 
    36 ; 
    37 ;  INITSIZE:  This is the initial size of the string. Default is 1.0. 
    38 ; 
    39 ;  STEP:   This is the amount the string size will change in each step 
    40 ;     of the interative process of calculating the string size. 
    41 ;     The default value is 0.05. 
    42 ; 
    43 ; OUTPUTS: 
    44 ; 
    45 ;  thisCharSize:  This is the size the specified string should be set 
    46 ;     to if you want to produce output of the specified target 
    47 ;     width. The value is in standard character size units where 
    48 ;     1.0 is the standard character size. 
    49 ; 
    50 ; EXAMPLE: 
    51 ; 
    52 ;  To make the string "Happy Holidays" take up 30% of the width of 
    53 ;  the current graphics window, type this: 
    54 ; 
    55 ;               XYOUTS, 0.5, 0.5, ALIGN=0.5, "Happy Holidays", $ 
    56 ;        CHARSIZE=STR_SIZE("Happy Holidays", 0.3) 
    57 ; 
    58 ; MODIFICATION HISTORY: 
    59 ; 
    60 ;  Written by: David Fanning, 17 DEC 96. 
    61 ;  Added a scaling factor to take into account the aspect ratio 
    62 ;     of the window in determing the character size. 28 Oct 97. DWF 
    6353;- 
    6454 
Note: See TracChangeset for help on using the changeset viewer.