Changeset 133 for trunk/SRC/Colors


Ignore:
Timestamp:
07/07/06 11:57:27 (18 years ago)
Author:
navarro
Message:

english and nicer header (1)

Location:
trunk/SRC/Colors
Files:
1 added
7 moved

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Colors/color24.pro

    r132 r133  
    11;+ 
    2 ; NAME: 
    3 ;       COLOR24 
    42; 
    5 ; PURPOSE: 
    6 ;       The purpose of this function is to convert a RGB color triple 
    7 ;       into the equivalent 24-big long integer.  
     3; @file_comments  
     4; The purpose of this function is to convert a RGB color triple 
     5; into the equivalent 24-big long integer.  
    86; 
    9 ; CATEGORY: 
    10 ;       Graphics, Color Specification. 
     7; @categories Graphics, Color Specification. 
    118; 
    12 ; CALLING SEQUENCE: 
    13 ;       color = COLOR24(rgb_triple) 
    14 ; 
    15 ; INPUTS: 
    16 ;       RGB_TRIPLE: A three-element column or row array representing  
     9; @param RGB_TRIPLE {in}{required} A three-element column or row array representing  
    1710;       a color triple. The values of the elements must be between  
    1811;       0 and 255. 
    1912; 
    20 ; KEYWORD PARAMETERS: 
    21 ;       None.  
     13; @returns a 24-bit long integer that is equivalent the input color.  
     14; The color is 
     15; described in terms of a hexidecimal number (e.g., FF206A) 
     16; where the left two digits represent the blue color, the  
     17; middle two digits represent the green color, and the right  
     18; two digits represent the red color. 
    2219; 
    23 ; COMMON BLOCKS: 
    24 ;       None. 
    25 ; 
    26 ; SIDE EFFECTS: 
    27 ;       None. 
    28 ; 
    29 ; RESTRICTIONS: 
    30 ;       None. 
    31 ; 
    32 ; EXAMPLE: 
    33 ;       To convert the color triple for the color YELLOW,  
     20; @examples To convert the color triple for the color YELLOW,  
    3421;       (255, 255, 0), to the hexadecimal value '00FFFF'x  
    3522;       or the decimal number 65535, type: 
     
    4027;       COLORS or GETCOLOR 
    4128; 
    42 ; MODIFICATION HISTORY: 
     29; @history 
    4330;       Written by:     David Fanning, 3 February 96. 
     31; 
     32; @version $Id$ 
     33; 
    4434;- 
    45  
    46  
    4735FUNCTION COLOR24, number 
    4836; 
    4937  compile_opt idl2, strictarrsubs 
    50 ; 
    51  
    52    ; This FUNCTION accepts a [red, green, blue] triple that 
    53    ; describes a particular color and returns a 24-bit long 
    54    ; integer that is equivalent to that color. The color is 
    55    ; described in terms of a hexidecimal number (e.g., FF206A) 
    56    ; where the left two digits represent the blue color, the  
    57    ; middle two digits represent the green color, and the right  
    58    ; two digits represent the red color. 
    59    ; 
    60    ; The triple can be either a row or column vector of 3 elements. 
    61     
     38;    
    6239ON_ERROR, 1 
    6340 
  • trunk/SRC/Colors/colorbar.pro

    r132 r133  
    11;+ 
    2 ; NAME: 
    3 ;   COLORBAR 
    4 ; 
    5 ; PURPOSE: 
    6 ;       The purpose of this routine is to add a color bar to the current 
    7 ;       graphics window. 
    8 ; 
    9 ; CATEGORY: 
    10 ;       Graphics, Widgets. 
    11 ; 
    12 ; CALLING SEQUENCE: 
    13 ;       COLORBAR 
    14 ; 
    15 ; INPUTS: 
    16 ;       None. 
    17 ; 
    18 ; KEYWORD PARAMETERS: 
    19 ; 
    20 ;       BOTTOM: The lowest color index of the colors to be loaded in 
     2; 
     3; @file_comments  
     4; The purpose of this routine is to add a color bar to the current 
     5; graphics window. 
     6; 
     7; @categories Graphics, Widgets. 
     8; 
     9; @keyword BOTTOM The lowest color index of the colors to be loaded in 
    2110;                 the bar. 
    2211; 
    23 ;       CB_CHARSIZE: The character size of the color bar annotations. Default is 1.0. 
    24 ; 
    25 ;       CB_CHARTICK: The character thick of the color bar annotations. Default is 1.0. 
    26 ; 
    27 ;       CB_COLOR:    The color index of the bar outline and characters. Default 
     12; @keyword CB_CHARSIZE The character size of the color bar annotations. Default is 1.0. 
     13; 
     14; @keyword CB_CHARTICK The character thick of the color bar annotations. Default is 1.0. 
     15; 
     16; @keyword CB_COLOR The color index of the bar outline and characters. Default 
    2817;                 is ncolors - 1 + bottom. 
    2918; 
    30 ;       CB_LOG: to get logarithmic scale for the colorbar 
    31 ; 
    32 ;       CB_TITLE:    This is title for the color bar. The default is to have 
     19; @keyword CB_LOG to get logarithmic scale for the colorbar 
     20; 
     21; @keyword CB_TITLE This is title for the color bar. The default is to have 
    3322;                 no title. 
    3423; 
    35 ;       DISCRET:  Vecteur contenant les incices des couleurs a tracer en barre 
    36 ; de couleur. On obtient ainsi une barre de couleur discrete ne comportant que 
    37 ; les couleurs specifiees ds l'ordre ou elles apparaissent ds le vecteur. 
    38 ; 
    39 ;       DIVISIONS: The number of divisions to divide the bar into. There will 
     24; @keyword DISCRETE Vector which contain color's indexes to trace in a color bar. Therefore 
     25;               we obtain a discreet color bar which only contains specified colors in  
     26;               order where they appear in the vector 
     27; 
     28; @keyword DIVISIONS The number of divisions to divide the bar into. There will 
    4029;                 be (divisions + 1) annotations. The default is 2. 
    4130; 
    42 ;       FORMAT:   The format of the bar annotations. Default is '(F6.2)'. 
    43 ; 
    44 ;       CB_LABEL:    C''est un vecteur qui specifie la valeur des sticks 
    45 ;       presents dans la barre de couleur. Il permet qd on utilise 
    46 ;       DISCRET d''avoir des couleurs qui ne s''incrementent pas de 
    47 ;       facon regulieres. 
    48 ; 
    49 ;       MAX:      The maximum data value for the bar annotation. Default is 
     31; @keyword FORMAT The format of the bar annotations. Default is '(F6.2)'. 
     32; 
     33; @keyword CB_LABEL It is a vector who specifie sticks's value attend in the color bar. 
     34;                It allowes, when we use DISCREET, to have colors which don't increase  
     35;                by increments in a regular way. 
     36; 
     37; @keyword MAX The maximum data value for the bar annotation. Default is 
    5038;                 NCOLORS-1. 
    5139; 
    52 ;       MIN:      The minimum data value for the bar annotation. Default is 0. 
    53 ; 
    54 ;       NCOLORS: This is the number of colors in the color bar. 
    55 ; 
    56 ;       NOTITLE:  oblige a ne pas mettre de titre meme si cb_title est declare 
    57 ; 
    58 ;       POSITION: A four-element array of normalized coordinates in the same 
     40; @keyword MIN The minimum data value for the bar annotation. Default is 0. 
     41; 
     42; @keyword NCOLOR This is the number of colors in the color bar. 
     43; 
     44; @keyword NOTITLE Force to don't writte title even if CB_TITLE is declarerd. 
     45; 
     46; @keyword POSITION A four-element array of normalized coordinates in the same 
    5947;                 form as the POSITION keyword on a plot. Default is 
    6048;                 [0.88, 0.15, 0.95, 0.95] for a vertical bar and 
    6149;                 [0.15, 0.88, 0.95, 0.95] for a horizontal bar. 
    6250; 
    63 ;       PSCOLOR: This keyword is only applied if the output is being sent to 
     51; @keyword PSCOLOR This keyword is only applied if the output is being sent to 
    6452;                 a PostScript file. It indicates that the PostScript device 
    6553;                 is configured for color output. If this keyword is set, then 
     
    7462;                 are outputting to a color PostScript printer. 
    7563; 
    76 ;       RIGHT:    This puts the labels on the right-hand side of a vertical 
     64; @keyword RIGHT This puts the labels on the right-hand side of a vertical 
    7765;                 color bar. It applies only to vertical color bars. 
    7866; 
    79 ;       TOP:      This puts the labels on top of the bar rather than under it. 
     67; @keyword TOP This puts the labels on top of the bar rather than under it. 
    8068;                 The keyword only applies if a horizontal color bar is rendered. 
    8169; 
    82 ;       VERTICAL: Setting this keyword give a vertical color bar. The default 
     70; @keyword VERTICAL Setting this keyword give a vertical color bar. The default 
    8371;                 is a horizontal color bar. 
    8472; 
    85 ; COMMON BLOCKS: 
    86 ;       None. 
    87 ; 
    88 ; SIDE EFFECTS: 
    89 ;       Color bar is drawn in the current graphics window. 
    90 ; 
    91 ; RESTRICTIONS: 
    92 ;       The number of colors available on the display device (not the 
     73; @restrictions Color bar is drawn in the current graphics window. 
     74; 
     75; @restrictions The number of colors available on the display device (not the 
    9376;       PostScript device) is used unless the NCOLORS keyword is used. 
    9477; 
    95 ; EXAMPLE: 
    96 ;       To display a horizontal color bar above a contour plot, type: 
    97 ; 
    98 ;       LOADCT, 5, NCOLORS=100 
    99 ;       CONTOUR, DIST(31,41), POSITION=[0.15, 0.15, 0.95, 0.75], $ 
    100 ;          C_COLORS=INDGEN(25)*4, NLEVELS=25 
    101 ;       COLORBAR, NCOLORS=100 
    102 ; 
    103 ; MODIFICATION HISTORY: 
    104 ;       Written by: David Fanning, 10 JUNE 96. 
     78; @examples To display a horizontal color bar above a contour plot, type: 
     79; 
     80;       IDL> LOADCT, 5, NCOLORS=100 
     81;       IDL> CONTOUR, DIST(31,41), POSITION=[0.15, 0.15, 0.95, 0.75], $ 
     82;       IDL> C_COLORS=INDGEN(25)*4, NLEVELS=25 
     83;       IDL> COLORBAR, NCOLORS=100 
     84; 
     85; @history Written by: David Fanning, 10 JUNE 96. 
    10586;       10/27/96: Added the ability to send output to PostScript. DWF 
    10687;       11/4/96: Substantially rewritten to go to screen or PostScript 
     
    11394;       3/3/98:  ajout du keyword discret par 
    11495;                sebastien (smasson@lodyc.jussieu.fr) 
     96; 
     97; @version $Id$ 
     98; 
    11599;- 
    116100 
    117101PRO COLORBAR, BOTTOM=bottom, CB_CHARSIZE=cb_charsize, CB_CHARTHICK=cb_charthick $ 
    118102              , CB_COLOR=cb_color, $ 
    119               DIVISIONS=divisions, DISCRET=discret,CB_LABEL = cb_label, $ 
     103              DIVISIONS=divisions, DISCRETE=discrete,CB_LABEL = cb_label, $ 
    120104              FORMAT=format, POSITION=position, MAX=max, MIN=min, NCOLORS=ncolors, $ 
    121105              PSCOLOR=pscolor, CB_TITLE=cb_title, VERTICAL=vertical, TOP=top, RIGHT=right, CB_LOG = CB_log, _extra = ex 
     
    189173 
    190174   IF KEYWORD_SET(vertical) THEN BEGIN 
    191       IF KEYWORD_SET(discret) THEN begin 
    192          facteur=256/n_elements(discret) 
    193          discret=reform(replicate(1,facteur) # discret,facteur*n_elements(discret), /overwrite)  
    194          bar = REPLICATE(1B,10) # discret 
     175      IF KEYWORD_SET(discrete) THEN begin 
     176         facteur=256/n_elements(discrete) 
     177         discrete=reform(replicate(1,facteur) # discrete,facteur*n_elements(discrete), /overwrite)  
     178         bar = REPLICATE(1B,10) # discrete 
    195179      endif else  bar = REPLICATE(1B,10) # BINDGEN(256) 
    196180      IF N_ELEMENTS(position) EQ 0 THEN position = [0.88, 0.15, 0.95, 0.95] 
    197181   ENDIF ELSE BEGIN 
    198       IF KEYWORD_SET(discret) THEN begin 
    199          facteur=256/n_elements(discret) 
    200          discret=reform(replicate(1,facteur) # discret,facteur*n_elements(discret), /overwrite)  
    201          bar =  discret # REPLICATE(1B,10) 
     182      IF KEYWORD_SET(discrete) THEN begin 
     183         facteur=256/n_elements(discrete) 
     184         discrete=reform(replicate(1,facteur) # discrete,facteur*n_elements(discrete), /overwrite)  
     185         bar =  discrete # REPLICATE(1B,10) 
    202186      endif else bar = BINDGEN(256) # REPLICATE(1B, 10) 
    203187      IF N_ELEMENTS(position) EQ 0 THEN position = [0.15, 0.88, 0.95, 0.95] 
     
    205189 
    206190                                ; Scale the color bar. 
    207    IF NOT KEYWORD_SET(discret) THEN $ 
     191   IF NOT KEYWORD_SET(discrete) THEN $ 
    208192    bar = BYTSCL(bar, TOP=ncolors-1) + bottom 
    209193 
  • trunk/SRC/Colors/getcolor.pro

    r132 r133  
    11;+ 
    2 ; NAME: 
    3 ;       GETCOLOR 
    4 ; 
    5 ; PURPOSE: 
    6 ;       The original purpose of this function was to enable the 
    7 ;       user to specify one of the 16 colors supported by the 
    8 ;       McIDAS color map by name. Over time, however, the function 
    9 ;       has become a general purpose function for handling and 
    10 ;       supporting drawing colors in a device-independent way. 
    11 ;       In particular, I have been looking for ways to write color 
    12 ;       handling code that will work transparently on both 8-bit and 
    13 ;       24-bit machines. On 24-bit machines, the code should work the 
    14 ;       same where color decomposition is turned on or off. 
     2; 
     3; @file_comments  
     4; The original purpose of this function was to enable the 
     5; user to specify one of the 16 colors supported by the 
     6; McIDAS color map by name. Over time, however, the function 
     7; has become a general purpose function for handling and 
     8; supporting drawing colors in a device-independent way. 
     9; In particular, I have been looking for ways to write color 
     10; handling code that will work transparently on both 8-bit and 
     11; 24-bit machines. On 24-bit machines, the code should work the 
     12; same where color decomposition is turned on or off. 
    1513; 
    1614;       (The 16 supported colors in GETCOLOR come from the McIDAS color 
    1715;       table offered on the IDL newsgroup by Liam Gumley.) 
    1816; 
    19 ; CATEGORY: 
    20 ;       Graphics, Color Specification. 
    21 ; 
    22 ; CALLING SEQUENCE: 
    23 ;       result = GETCOLOR(color) 
    24 ; 
    25 ; OPTIONAL INPUT PARAMETERS: 
    26 ;       COLOR: A string with the "name" of the color. Valid names are: 
     17; @categories Graphics, Color Specification. 
     18; 
     19; @param thisColor {in}{optional} A string with the "name" of the color. Valid names are: 
    2720;           black 
    2821;           magenta 
     
    5346;           IDL 5.2 or higher. 
    5447; 
    55 ;       INDEX: The color table index where the specified color should be loaded. 
     48; @param index {in}{optional} The color table index where the specified color should be loaded. 
    5649;           If this parameter is passed, then the return value of the function is the 
    5750;           index number and not the color triple. (If color decomposition is turned 
     
    6962;           TVLCT, colors, 100 
    7063; 
    71 ; 
    72 ; INPUT KEYWORD PARAMETERS: 
    73 ; 
    74 ;       NAMES: If this keyword is set, the return value of the function is 
     64; @keyword NAMES If this keyword is set, the return value of the function is 
    7565;              a 16-element string array containing the names of the colors. 
    7666;              These names would be appropriate, for example, in building 
     
    8070;                 listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16) 
    8171; 
    82 ;       LOAD:  If this keyword is set, all 16 colors are automatically loaded 
     72; @keyword LOAD  If this keyword is set, all 16 colors are automatically loaded 
    8373;              starting at the color index specified by the START keyword. 
    8474;              Note that setting this keyword means that the return value of the 
     
    9282;              byte array or a long integer value. 
    9383; 
    94 ;       START: The starting color index number if the LOAD keyword is set. This keyword 
     84; @keyword START The starting color index number if the LOAD keyword is set. This keyword 
    9585;              value is ignored unless the LOAD keyword is also set. The keyword is also 
    9686;              ignored if the TRUE keyword is set or if color decomposition in on in 
     
    9888;              !D.TABLE_SIZE - 17. 
    9989; 
    100 ;       TRUE:  If this keyword is set, the specified color triple is returned 
     90; @keyword TRUE  If this keyword is set, the specified color triple is returned 
    10191;              as a 24-bit integer equivalent. The lowest 8 bits correspond to 
    10292;              the red value; the middle 8 bits to the green value; and the 
     
    10595;              were set. 
    10696; 
    107 ; COMMON BLOCKS: 
    108 ;       None. 
    109 ; 
    110 ; SIDE EFFECTS: 
    111 ;       None. 
    112 ; 
    113 ; RESTRICTIONS: 
    114 ;       The TRUE keyword causes the START keyword to be ignored. 
     97; @restrictions The TRUE keyword causes the START keyword to be ignored. 
    11598;       The NAMES keyword causes the COLOR, INDEX, START, and TRUE parameters to be ignored. 
    11699;       The COLOR parameter is ignored if the LOAD keyword is used. 
     
    119102;       returned if color decomposition is ON. 
    120103; 
    121 ; EXAMPLE: 
    122 ;       To load a yellow color in color index 100 and plot in yellow, type: 
    123 ; 
    124 ;          yellow = GETCOLOR('yellow', 100) 
    125 ;          PLOT, data, COLOR=yellow 
     104;  
     105; @examples To load a yellow color in color index 100 and plot in yellow, type: 
     106; 
     107;          IDL> yellow = GETCOLOR('yellow', 100) 
     108;          IDL> PLOT, data, COLOR=yellow 
    126109; 
    127110;       or, 
    128111; 
    129 ;          PLOT, data, COLOR=GETCOLOR('yellow', 100) 
     112;          IDL> PLOT, data, COLOR=GETCOLOR('yellow', 100) 
    130113; 
    131114;       To do the same thing on a 24-bit color system with decomposed color on, type: 
    132115; 
    133 ;          PLOT, data, COLOR=GETCOLOR('yellow', /TRUE) 
     116;          IDL> PLOT, data, COLOR=GETCOLOR('yellow', /TRUE) 
    134117; 
    135118;       or in IDL 5.2 and higher, 
    136119; 
    137 ;          DEVICE, Decomposed=1 
    138 ;          PLOT, data, COLOR=GETCOLOR('yellow') 
     120;          IDL> DEVICE, Decomposed=1 
     121;          IDL> PLOT, data, COLOR=GETCOLOR('yellow') 
    139122; 
    140123;       To load all 16 colors into the current color table, starting at 
    141124;       color index 200, type: 
    142125; 
    143 ;          TVLCT, GETCOLOR(), 200 
     126;          IDL> TVLCT, GETCOLOR(), 200 
    144127; 
    145128;       To add the color names to a list widget: 
    146129; 
    147 ;           listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16) 
     130;           IDL> listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16) 
    148131; 
    149132;       To load all 16 colors and have the color indices returned in a structure: 
    150133; 
    151 ;           DEVICE, Decomposed=0 
    152 ;           colors = GetColor(/Load, Start=1) 
    153 ;           HELP, colors, /Structure 
     134;           IDL> DEVICE, Decomposed=0 
     135;           IDL> colors = GetColor(/Load, Start=1) 
     136;           IDL> HELP, colors, /Structure 
    154137;           PLOT, data, COLOR=colors.yellow 
    155138; 
    156139;       To get the direct color values as 24-bit integers in color structure fields: 
    157140; 
    158 ;           DEVICE, Decomposed=1 
    159 ;           colors = GetColor(/Load) 
    160 ;           PLOT, data, COLOR=colors.yellow 
     141;           IDL> DEVICE, Decomposed=1 
     142;           IDL> colors = GetColor(/Load) 
     143;           IDL> PLOT, data, COLOR=colors.yellow 
    161144; 
    162145;       Note that the START keyword value is ignored if on a 24-bit device, 
     
    164147;       writing code like this: 
    165148; 
    166 ;           colors = GetColor(/Load) 
    167 ;           PLOT, data, Color=colors.yellow 
    168 ; 
    169 ; MODIFICATION HISTORY: 
    170 ;       Written by: David Fanning, 10 February 96. 
     149;           IDL> colors = GetColor(/Load) 
     150;           IDL> PLOT, data, Color=colors.yellow;           IDL> DEVICE, Decomposed=0 
     151;           IDL> colors = GetColor(/Load, Start=1) 
     152;           IDL> HELP, colors, /Structure 
     153;           PLOT, data, COLOR=colors.yellow 
     154; 
     155;       To get the direct color values as 24-bit integers in color structure fields: 
     156; 
     157;           IDL> DEVICE, Decomposed=1 
     158;           IDL> colors = GetColor(/Load) 
     159;           IDL> PLOT, data, COLOR=colors.yellow 
     160; 
     161;       Note that the START keyword value is ignored if on a 24-bit device, 
     162;       so it is possible to write completely device-independent code by 
     163;       writing code like this: 
     164; 
     165;           IDL> colors = GetColor(/Load) 
     166;           IDL> PLOT, data, Color=colors.yellow 
     167; 
     168; @history Written by: David Fanning, 10 February 96. 
    171169;       Fixed a bug in which N_ELEMENTS was spelled wrong. 7 Dec 96. DWF 
    172170;       Added the McIDAS colors to the program. 24 Feb 99. DWF 
     
    176174;       Added automatic recognition of DECOMPOSED=1 state. 7 June 99. DWF 
    177175;       Added LOAD AND START keywords. 7 June 99. DWF. 
     176; 
     177; @version $Id$ 
    178178;- 
    179  
    180  
    181  
    182 FUNCTION COLOR24, number 
    183 ; 
    184   compile_opt idl2, strictarrsubs 
    185 ; 
    186  
    187    ; This FUNCTION accepts a [red, green, blue] triple that 
    188    ; describes a particular color and returns a 24-bit long 
    189    ; integer that is equivalent to that color. The color is 
    190    ; described in terms of a hexidecimal number (e.g., FF206A) 
    191    ; where the left two digits represent the blue color, the 
    192    ; middle two digits represent the green color, and the right 
    193    ; two digits represent the red color. 
    194    ; 
    195    ; The triple can be either a row or column vector of 3 elements. 
    196  
    197 ON_ERROR, 1 
    198  
    199 IF N_ELEMENTS(number) NE 3 THEN $ 
    200    MESSAGE, 'Augument must be a three-element vector.' 
    201  
    202 IF MAX(number) GT 255 OR MIN(number) LT 0 THEN $ 
    203    MESSAGE, 'Argument values must be in range of 0-255' 
    204  
    205 base16 = [[1L, 16L], [256L, 4096L], [65536L, 1048576L]] 
    206  
    207 num24bit = 0L 
    208  
    209 FOR j=0,2 DO num24bit = num24bit + ((number[j] MOD 16) * base16[0,j]) + $ 
    210    (Fix(number[j]/16) * base16[1,j]) 
    211  
    212 RETURN, num24bit 
    213 END ; ************************  of COLOR24  ****************************** 
    214  
    215  
    216179 
    217180FUNCTION GETCOLOR, thisColor, index, TRUE=truecolor, $ 
  • trunk/SRC/Colors/lct.pro

    r132 r133  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME:lct 
    65; 
    7 ; PURPOSE:plus court que de taper loadct,file='palette.tbl' 
     6; @file_comments  
     7; Fastest than type loadct,file='palette.tbl' 
    88; 
    9 ; CATEGORY:flemme 
     9; @categories graphics, color specification 
    1010; 
    11 ; CALLING SEQUENCE:lct[,numerp_couleur] 
     11; @param numpal {in}{optional} number of the color palette we want to select in the file palette.tbl 
    1212; 
    13 ; INPUTS:optionnel: numero de la couleur que l''on veut ds palette.tbl 
    14 ; 
    15 ; KEYWORD PARAMETERS: ceux de loadct 
    16 ; 
    17 ;        LIGHTNESS: a scalar used to change the Lightness of the color 
     13; @keyword LIGHTNESS a scalar used to change the Lightness of the color 
    1814;            palette to be abble to adjust according to the printer we use, 
    1915;            the media (paper or slide)...  
     
    2117;                         > 1 to get darker colors 
    2218; 
    23 ; rq: si le mot cle file n''est pas specifie, on cherche un fichier 
    24 ; contenant les palette du nom de palette.tbl. 
    25 ; Ce fichier peut etre dans n''importe quel repertoire du !path 
     19; @keyword FILE {default=palette.tbl} is not specified, we are looking  a file containing  
     20; palettes named palette.tbl. 
     21; This file can be in any directory of the !path 
    2622; 
    27 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr) 
    28 ;                       30/3/1999 ajout de _extra, de la recherche 
    29 ;                       du nom complet et pour que ca marche aussi en 
    30 ;                       mode PS et Z 
    31 ;                       6/7/1999: compatibilite mac et windows 
     23; @keyword GET_NAME Set this keyword to a named variable in which the names of the color tables 
     24;          are reurned as a string array. No changes are made to the color table. 
     25; 
     26; @keyword _EXTRA Used to pass your keywords 
     27; 
     28; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
     29;          30/3/1999: add extra 
     30;          6/7/1999: mac/windows comptibility 
     31; 
     32; @version $Id$ 
     33; 
    3234;- 
    3335;------------------------------------------------------------ 
    3436;------------------------------------------------------------ 
    3537;------------------------------------------------------------ 
    36 PRO lct, numero, GET_NAME = get_name, LIGHTNESS = Lightness, _EXTRA = ex 
     38PRO lct, numpal, FILE = file, GET_NAME = get_name, LIGHTNESS = Lightness, _EXTRA = ex 
    3739; 
    3840  compile_opt idl2, strictarrsubs 
    3941; 
    4042@common 
    41 ; le mot cle file est passe par l''intermediere de EXTRA? 
    42 ; definition du mon du fichier qui contient les palettes de couleur 
    43    if n_elements(ex) NE 0 then BEGIN  
    44       if (where(tag_names(ex) EQ 'FILE'))[0] NE -1 then nompal=ex.FILE ELSE nompal='palette.tbl' 
    45    ENDIF ELSE nompal = 'palette.tbl' 
    46 ; quelle est l''adresse complete de nompal? 
     43; definition of the name of the file containing colors palettes. 
     44   if keyword_set(file) then nametbl = file ELSE nametbl = 'palette.tbl' 
     45; What is the full adress of nametbl? 
    4746   thisOS = strupcase(strmid(!version.os_family, 0, 3)) 
    4847   CASE thisOS of 
     
    5251   ENDCASE 
    5352   cd, current = current 
    54    if strpos(nompal,sep) lt 0 then BEGIN 
     53   if strpos(nametbl,sep) lt 0 then BEGIN 
    5554      if rstrpos(current,sep) NE strlen(current)-1 then current = current+sep 
    5655      multipath = str_sep(!path,pathsep) 
     
    5857       if rstrpos(multipath[i],sep) NE strlen(multipath[i])-1 then $ 
    5958       multipath[i] = multipath[i] +sep 
    60       nompal = [current, multipath]+ nompal 
     59      nametbl = [current, multipath]+ nametbl 
    6160   ENDIF 
    62 ; on test tous les noms possibles pour trouver ou est le fichier 
    63    nfile=n_elements(nompal) 
     61; we test all possible name in order to find where file is. 
     62   nfile=n_elements(nametbl) 
    6463   n = 0 
    6564   repeat begin 
    66       res = findfile(nompal[n])  
     65      res = findfile(nametbl[n])  
    6766      n = n+1 
    68    endrep until res[0] NE '' OR n EQ n_elements(nompal)  
     67   endrep until res[0] NE '' OR n EQ n_elements(nametbl)  
    6968   if res[0] NE '' then BEGIN 
    70       nompal = nompal[n-1] 
     69      nametbl = nametbl[n-1] 
    7170      if n_elements(ex) NE 0 then $  
    72        if (where(tag_names(ex) EQ 'FILE'))[0] NE -1 then ex.FILE = nompal 
    73 ; si on est en mode POSTSCRIPT, il faut repasser en mode X pour 
    74 ; changer la palette de couleur 
     71        if (where(tag_names(ex) EQ 'FILE'))[0] NE -1 then ex.FILE = nametbl 
     72; if we are in POSTSCRIPT mode, we have to pass in X mode in order to change the color palette 
    7573      oldname = !d.name 
    7674      if !d.name EQ 'PS' OR !d.name EQ 'Z' then BEGIN  
     
    8987; 
    9088      if arg_present(get_name) then begin 
    91          if n_elements(numero) EQ 0 then loadct, file=nompal, GET_NAME = get_name, _EXTRA = ex $ 
    92          ELSE loadct,numero, file=nompal, /silent, GET_NAME = get_name,_EXTRA = ex 
     89         if n_elements(numpal) EQ 0 then loadct, file=nametbl, GET_NAME = get_name, _EXTRA = ex $ 
     90         ELSE loadct,numpal, file=nametbl, /silent, GET_NAME = get_name,_EXTRA = ex 
    9391      ENDIF ELSE BEGIN  
    94          if n_elements(numero) EQ 0 then loadct, file=nompal, _EXTRA = ex $ 
    95          ELSE loadct,numero, file=nompal, /silent, _EXTRA = ex 
     92         if n_elements(numpal) EQ 0 then loadct, file=nametbl, _EXTRA = ex $ 
     93         ELSE loadct,numpal, file=nametbl, /silent, _EXTRA = ex 
    9694      ENDELSE  
    9795; 
  • trunk/SRC/Colors/newpalette.pro

    r132 r133  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME:newpalette 
    65; 
    7 ; PURPOSE:permet de stocker la palette qui est a l''ecran dans un 
    8 ; fichier du meme type que celui fournit par defaut dans IDL: 
     6; @file_comments  
     7; Allows to stock the palette which is on the screen 
     8; in a same type file than the one gave by default in IDL 
    99; 'colors1.tbl'. 
    1010; 
    11 ; CATEGORY:pour garder ses jolies palettes perso. 
     11; @categories graphic, color specification 
    1212; 
    13 ; CALLING SEQUENCE:newpalette,nom_de_palette 
     13; @param namepal {in}{required} It is a string containing the name of the new palettte we want to write. 
    1414; 
    15 ; INPUTS:nom_de_palette: c'est un string qui contient le nom de la 
    16 ; nouvelle palette que l''on veut ecrire. 
     15; @keyword  OVER It is a whole number which designate the number of the palette 
     16;               we want to replace the palette on the screen  
    1717; 
    18 ; KEYWORD PARAMETERS:  
     18; @keyword FILE {default=palette.tbl} is not specified, we are looking  a file containing  
     19;              palettes named palette.tbl. 
     20;              This file can be in any directory of the !path 
     21;              On the other hand it must be writable 
    1922; 
    20 ; OVER: c''est un entier qui designe le numero de la palette que l''on 
    21 ; veut remplacer par la palette a l''ecran. 
    22 ;  
    23 ; + ceux de modifyct 
     23; @keyword _extra Used to pass your keywords 
    2424; 
    25 ; rq: si le mot cle file n''est pas specifie, on cherche un fichier 
    26 ; contenant les palettes du nom de palette.tbl. 
    27 ; Ce fichier peut etre dans n''importe quel repertoire du !path 
    28 ; Par contre il doit etre en droit d''ecriture 
     25; @history Guillaume Roulet (gr@lodyc.jussieu.fr) 
     26;                       30/3/1999 s.masson, add _extra, research of the full name, OVER 
     27;                       5/5/1999 s.masson 
    2928; 
    30 ; MODIFICATION HISTORY: Guillaume Roulet (gr@lodyc.jussieu.fr) 
    31 ;                       30/3/1999 s.masson, ajout de _extra, de le 
    32 ;                       recherche du nom complet, de OVER et du blabla 
    33 ;                       5/5/1999 s.masson, va copie eventuelle du 
    34 ;                       fichier contenant les palettes 
     29; @version $Id$ 
     30; 
     31; @todo seb cleaning + traduction 
    3532;- 
    3633;------------------------------------------------------------ 
    3734;------------------------------------------------------------ 
    3835;------------------------------------------------------------ 
    39 pro newpalette,nom, OVER = over, _extra = ex 
    40 ; le mot cle file est passe par l''intermediere de EXTRA? 
    41 ; definition du mon du fichier qui contient les palettes de couleur 
     36pro newpalette,namepal, FILE = file, OVER = over, _extra = ex 
    4237; 
    4338  compile_opt idl2, strictarrsubs 
    4439; 
    45    if n_elements(ex) NE 0 then BEGIN  
    46       if (where(tag_names(ex) EQ 'FILE'))[0] NE -1 then nompal=ex.FILE ELSE nompal='palette.tbl' 
    47    ENDIF ELSE nompal = 'palette.tbl' 
    48    nomcourt = nompal 
    49 ; quelle est l''adresse complete de nompal? 
    50    nompal = find(nompal) 
    51    if nompal[0] NE 'NOT FOUND' then begin 
    52       nompal = nompal[0] 
    53 ; nompal nous appartient??? 
     40; definition of the name of the file containing colors palettes. 
     41   if keyword_set(file) then nametbl = file ELSE nametbl = 'palette.tbl' 
     42   nomcourt = nametbl 
     43; What is the full adress of nametbl? 
     44   nametbl = find(nametbl) 
     45   if nametbl[0] NE 'NOT FOUND' then begin 
     46      nametbl = nametbl[0] 
     47; does nametbl is our? 
    5448      spawn, 'whoami', login 
    55       appartient = strpos(nompal, login[0]) 
     49      appartient = strpos(nametbl, login[0]) 
    5650      if appartient EQ -1 then begin 
    57          ouinon = report('Le fichier '+nompal+' ne vous appartient pas, Voulez-vous copier le fichier '+nomcourt+' dans le repertoire courant: '+current+' ?', /default_no, /question) 
     51         ouinon = report('Le fichier '+nametbl+' ne vous appartient pas, Voulez-vous copier le fichier '+nomcourt+' dans le repertoire courant: '+current+' ?', /default_no, /question) 
    5852         if ouinon then return ELSE BEGIN  
    59             spawn, 'cp '+nompal+' '+nomcourt ; on copie 
    60             nompal = nomcourt 
    61             spawn,  'chmod u+w '+nompal ; on se donne les droits d''ecriture 
     53            spawn, 'cp '+nametbl+' '+nomcourt ; copy 
     54            nametbl = nomcourt 
     55            spawn,  'chmod u+w '+nametbl ; give writing rights 
    6256         ENDELSE 
    6357      endif 
    64    ENDIF ELSE BEGIN             ; aucun fichier nompal a ete trouve 
    65       nompal = nomcourt         ; on recupe le nompal d''origine 
    66       ouinon = report('le fichier de palettes demande '+nompal+' n''existe pas ds les repertoires !path. Voulez-vous cree un fichier '+nompal+' dans le repertoire courant', /default_no, /question) 
     58   ENDIF ELSE BEGIN             ; no file nametbl found 
     59      nametbl = nomcourt         ; we reclaim the nametbl source 
     60      ouinon = report('le fichier de palettes demande '+nametbl+' n''existe pas ds les repertoires !path. Voulez-vous cree un fichier '+nametbl+' dans le repertoire courant', /default_no, /question) 
    6761      if NOT ouinon then return 
    6862      nomfichsource = filepath('colors1.tbl', subdir=['resource', 'colors'])  
    69       spawn,'cp '+nomfichsource+' '+nompal ; on copie 
    70       spawn,  'chmod u+w '+nompal ; on se donne les droits d''ecriture 
     63      spawn,'cp '+nomfichsource+' '+nametbl ; copy 
     64      spawn,  'chmod u+w '+nametbl ; give writing rights 
    7165   ENDELSE  
    7266 
    7367   if n_elements(ex) NE 0 then $  
    74     if (where(tag_names(ex) EQ 'FILE'))[0] NE -1 then ex.FILE = nompal 
     68    if (where(tag_names(ex) EQ 'FILE'))[0] NE -1 then ex.FILE = nametbl 
    7569; 
    7670   tvlct,r,g,b,/get 
     
    7973   b=congrid(b,256) 
    8074   IF n_elements(over) EQ 0 then over = 255 
    81    modifyct,over,nom,r,g,b,file=nompal, _extra = ex 
     75   modifyct,over,namepal,r,g,b,file=nametbl, _extra = ex 
    8276; 
    8377   return 
  • trunk/SRC/Colors/xlct.pro

    r132 r133  
    1 ; $Id$ 
    2 ; 
    3 ; Copyright (c) 1991-1998, Research Systems, Inc.  All rights reserved. 
    4 ;       Unauthorized reproduction prohibited. 
    51 
    62PRO XLCT_PSAVE                  ;Save/Restore our plotting state. 
     
    375371 
    376372;+ 
    377 ; NAME: 
    378 ;       XLCT 
    379 ; PURPOSE: 
    380 ;       comme xloadct mais plus cour a ecrire et appelle par defaut la 
    381 ;       palette palette.tbl qui peut etre situee dans n''importe quel 
    382 ;       repertoire de !path. 
    383 ; 
    384 ; CATEGORY: 
    385 ;       Widgets 
    386 ; CALLING SEQUENCE: 
    387 ;       XLCT 
    388 ; INPUTS: 
    389 ;       None. 
    390 ; KEYWORDS: 
    391 ;       FILE:   If this keyword is set, the file by the given name is used 
     373; @file_comments  
     374; Like xloadct but fastest to write and call by default the palette  
     375; palette.tbl which can be in any directory 
     376; 
     377; @categories Widgets 
     378; 
     379; @keyword FILE If this keyword is set, the file by the given name is used 
    392380;               instead of the file colors1.tbl in the IDL directory.  This 
    393381;               allows multiple IDL users to have their own color table file. 
    394 ;       GROUP = The widget ID of the widget that calls Xlct.  When  
     382; @keyword GROUP The widget ID of the widget that calls Xlct.  When  
    395383;               this ID is specified, a death of the caller results in a  
    396384;               death of Xlct 
    397 ;       NCOLORS = number of colors to use.  Use color indices from BOTTOM 
     385; @keyword NCOLORS = number of colors to use.  Use color indices from BOTTOM 
    398386;               to the smaller of !D.TABLE_SIZE-1 and NCOLORS-1. 
    399387;               Default = !D.TABLE_SIZE = all available colors. 
    400 ;       BOTTOM = first color index to use. Use color indices from BOTTOM to 
     388; @keyword BOTTOM = first color index to use. Use color indices from BOTTOM to 
    401389;               BOTTOM+NCOLORS-1.  Default = 0. 
    402 ;       SILENT - Normally, no informational message is printed when 
     390; @keyword SILENT - Normally, no informational message is printed when 
    403391;               a color map is loaded. If this keyword is present and 
    404392;               zero, this message is printed. 
    405 ;       USE_CURRENT: If set, use the current color tables, regardless of 
     393; @keyword USE_CURRENT: If set, use the current color tables, regardless of 
    406394;               the contents of the COMMON block COLORS. 
    407 ;       MODAL:  If set, then XLCT runs in "modal" mode, meaning that 
     395; @keyword MODAL:  If set, then XLCT runs in "modal" mode, meaning that 
    408396;               all other widgets are blocked until the user quits XLCT. 
    409397;               A group leader must be specified (via the GROUP keyword) 
    410398;               for the MODAL keyword to have any effect.   The default 
    411399;               is to not run in modal mode. 
    412 ;       BLOCK:  Set this keyword to have XMANAGER block when this 
     400; @keyword BLOCK:  Set this keyword to have XMANAGER block when this 
    413401;               application is registered.  By default the Xmanager 
    414402;               keyword NO_BLOCK is set to 1 to provide access to the 
     
    418406;               application.  For more information see the NO_BLOCK keyword 
    419407;               to XMANAGER. 
    420 ;       UPDATECALLBACK: Set this keyword to a string containing the name of 
     408; @keyword UPDATECALLBACK: Set this keyword to a string containing the name of 
    421409;               a user-supplied procedure that will be called when the color 
    422410;               table is updated by XLCT.  The procedure may optionally 
     
    424412;               set to the value specified by the optional UPDATECBDATA 
    425413;               keyword. 
    426 ;       UPDATECBDATA: Set this keyword to a value of any type. It will be 
     414; @keyword UPDATECBDATA: Set this keyword to a value of any type. It will be 
    427415;               passed via the DATA keyword to the user-supplied procedure 
    428416;               specified via the UPDATECALLBACK keyword, if any. If the 
     
    431419;               will be undefined. 
    432420; 
    433 ; OUTPUTS: 
    434 ;       None. 
    435 ; COMMON BLOCKS: 
    436 ;       None. 
    437 ; SIDE EFFECTS: 
    438 ;       One of the predefined color maps may be loaded. 
    439 ; RESTRICTIONS: 
    440 ;       This routine uses the LOADCT user library procedure to 
     421; @restrictions One of the predefined color maps may be loaded. 
     422; 
     423; @restrictions This routine uses the LOADCT user library procedure to 
    441424;       do the actual work. 
    442 ; MODIFICATION HISTORY: 
    443 ;       5/5/1999 copie de xloadct par Sebastien Masson (smlod@ipsl.jussieu.fr) 
     425; 
     426; @history 5/5/1999 copie de xloadct par Sebastien Masson (smlod@ipsl.jussieu.fr) 
     427; 
     428; @version $Id$ 
     429; 
    444430;- 
    445431 
     
    471457   IF KEYWORD_SET(SILENT_f) THEN silent = SILENT_F ELSE silent = 1 
    472458;----------------------------------------------------------------------------- 
    473 ; changements effectues par S.Masson 
     459; Changes made by S.Masson 
    474460;----------------------------------------------------------------------------- 
    475461   IF N_ELEMENTS(file) GT 0 THEN filename = file ELSE BEGIN  
  • trunk/SRC/Colors/xpal.pro

    r132 r133  
    1 ; $Id$ 
    2 ; 
    3 ; Copyright (c) 1992-1998, Research Systems, Inc.  All rights reserved. 
    4 ;       Unauthorized reproduction prohibited. 
    51;+ 
    6 ; NAME: 
    7 ;       XPAL 
    8 ; 
    9 ; PURPOSE: 
    10 ;       comme xpalette mais plus court a ecrire et possede en plus 
    11 ;       une touche save qui (grace a la routine newpalette) permet de 
    12 ;       sauver la routine que l''on vient de faire. Rq qd on appuie 
    13 ;       sur la touche predefined appelle xlct plutot que xloadct  
    14 ; 
    15 ; CATEGORY: 
    16 ;       Color tables, widgets. 
    17 ; 
    18 ; CALLING SEQUENCE: 
    19 ;       XPAL 
    20 ; 
    21 ; INPUTS: 
    22 ;       No explicit inputs.  The current color table is used as a starting 
    23 ;       point. 
    24 ; 
    25 ; KEYWORD PARAMETERS: 
    26 ;       BLOCK:  Set this keyword to have XMANAGER block when this 
     2; 
     3; @file_comments  
     4; like xpalette but shorter to write and ,moreover, 
     5; possess a hotkey save which (thanks to the newpalette routine) 
     6; allows to save the routine that we have just done. Comment: when we 
     7; press the predefined hotkey, it calls xlct instead of xloadct  
     8; No explicit inputs.  The current color table is used as a starting point. 
     9; 
     10; @categories Color tables, widgets. 
     11; 
     12; @keyword BLOCK Set this keyword to have XMANAGER block when this 
    2713;               application is registered.  By default the Xmanager 
    2814;               keyword NO_BLOCK is set to 1 to provide access to the 
     
    3218;               application.  For more information see the NO_BLOCK keyword 
    3319;               to XMANAGER. 
    34 ;       UPDATECALLBACK: Set this keyword to a string containing the name of 
     20; @keyword UPDATECALLBACK Set this keyword to a string containing the name of 
    3521;               a user-supplied procedure that will be called when the color 
    3622;               table is updated by XLOADCT.  The procedure may optionally 
     
    3824;               set to the value specified by the optional UPDATECBDATA 
    3925;               keyword. 
    40 ;       UPDATECBDATA: Set this keyword to a value of any type. It will be 
     26; @keyword UPDATECBDATA Set this keyword to a value of any type. It will be 
    4127;               passed via the DATA keyword to the user-supplied procedure 
    4228;               specified via the UPDATECALLBACK keyword, if any. If the 
     
    4531;               will be undefined. 
    4632; 
    47 ; OUTPUTS: 
    48 ;       None. 
    49 ; 
    50 ; COMMON BLOCKS: 
    51 ;       COLORS: Contains the current RGB color tables. 
    52 ;       XP_COM: Private to this module. 
    53 ; 
    54 ; SIDE EFFECTS: 
    55 ;       XPAL uses two colors from the current color table as 
     33; @uses COLORS: Contains the current RGB color tables. 
     34; @uses XP_COM: Private to this module. 
     35; 
     36; @restrictions XPAL uses two colors from the current color table as 
    5637;       drawing foreground and background colors. These are used 
    5738;       for the RGB plots on the left, and the current index marker on 
     
    7253;       to the display. 
    7354; 
    74 ; PROCEDURE: 
    75 ;       The XPAL widget has the following controls: 
     55; @examples The XPAL widget has the following controls: 
    7656; 
    7757;       Left:   Three plots showing the current Red, Green, and Blue vectors. 
     
    9575;               pressed: 
    9676; 
    97 ;               Done:  Exits XPAL. 
    98 ; 
    99 ;         Predefined:  Starts XLOADCT to allow selection of one of the 
     77;                 Done: Exits XPAL. 
     78; 
     79;           Predefined: Starts XLOADCT to allow selection of one of the 
    10080;                       predefined color tables. 
    10181; 
    102 ;               Help:  Supplies help information similar to this header. 
     82;                 Help: Supplies help information similar to this header. 
    10383; 
    10484;               Redraw: Completely redraws the display using the current 
     
    11797;                       index and the mark index are interpolated linearly 
    11898;                       to lie between the colors of two endpoints. 
    119 ;                 save: permet de sauver la palette qui est 
    120 ;                       actuellement a l''ecran. Qd on appuie sur ce 
    121 ;                       bouton, un widget apparait qui demande: 
    122 ;                        1) le nom a donner a la palette que l''on veut sauver 
    123 ;                        2) le numero de la palette que l''on veut 
    124 ;                        eventuellement ecrase par la nouvelle 
    125 ;                        palette.Si aucun numero n''est specifie la 
    126 ;                        nouvelle palette estajoutee aux anciennes. 
    127 ;                        3) le nom du fichier qui contient les 
    128 ;                        palettes. Rq: suivre eventuellement les 
    129 ;                        indications fournis au prompteur. 
     99;                 save: Allows to save  the palette which is currently 
     100;                       on the screen. When we press this hotkey, there is a 
     101;                       widget who appear and ask: 
     102;                        1) the name of the palette we want to save. 
     103;                        2) The number of the palette we may want to erase 
     104;                        by the new palette. If there is not any number 
     105;                        specified, the new palette is add to elders. 
     106;                        3) The name of the file containing palettes. 
     107;                        Comment: May follow instructions gave by the prompter. 
    130108;                 
    131109; 
     
    147125;                          horizontally. 
    148126; 
    149 ; MODIFICATION HISTORY: 
    150 ;          addaptation de xpalette pour ajouter un bouton save par 
     127; @history addaptation de xpalette pour ajouter un bouton save par 
    151128;          Gima Nicolas (nglod@ipsl.jussieu.fr) et par Masson 
    152129;          Sebastien (smlod@ipsl.jussieu.fr) 
     130; 
     131; $Id$ 
     132; 
    153133;- 
    154  
     134; 
     135;+ 
     136; @file_comments XP_NEW_COLORS: Choose the best foreground and background colors for the current 
     137;                color maps and set !P appropriately. Returns 1 if the colors changed, 
     138;                0 otherwise. 
     139; 
     140; @returns 1 or 0 
     141;-  
    155142function XP_NEW_COLORS 
    156 ; Choose the best foreground and background colors for the current 
    157 ; color maps and set !P appropriately. Returns 1 if the colors changed, 
    158 ; 0 otherwise. 
    159143; 
    160144  compile_opt idl2, strictarrsubs 
     
    202186  endif 
    203187end 
    204  
     188;+ 
     189; @file_comments XP_XLCTCALLBACK:  For visuals with static colormaps, update the graphics 
     190;                after a change by XLOADCT. 
     191;- 
    205192pro XP_XLCTCALLBACK 
    206   ; For visuals with static colormaps, update the graphics 
    207   ; after a change by XLOADCT. 
    208193; 
    209194  compile_opt idl2, strictarrsubs 
     
    230215end 
    231216 
    232  
    233  
    234 pro XP_REPLOT, color_index, type 
    235 ; Re-draw the RGB plots. Type has the following possible values. 
    236 ;;      - 'D': Draw the data part of all three plots 
     217;+ 
     218; @file_comments XP_REPLOT: Re-draw the RGB plots. Type has the following possible values. 
     219;       - 'D': Draw the data part of all three plots 
    237220;       - 'F': draw all three plots 
    238221;       - 'R': Draw the data part of the Red plot 
    239222;       - 'G': Draw the data part of the Green plot 
    240223;       - 'B': Draw the data part of the Blue plot 
     224;-  
     225pro XP_REPLOT, color_index, type 
    241226; 
    242227  compile_opt idl2, strictarrsubs 
     
    312297 
    313298 
    314  
    315 pro XP_CHANGE_COLOR, type, value 
    316 ; Change current color. Type has the following possible values. 
     299;+ 
     300; @file_comments XP_CHANGE_COLOR:  Change current color. Type has the following possible values. 
    317301;       - 'R': Change the R part of the current color 
    318302;       - 'G': ... 
    319303;       - 'B': ... 
     304;- 
     305pro XP_CHANGE_COLOR, type, value 
    320306; 
    321307  compile_opt idl2, strictarrsubs 
     
    553539 
    554540 
    555  
     541;+ 
     542; 
     543; @keyword group  
     544; 
     545; @keyword BLOCK Set this keyword to have XMANAGER block when this 
     546;               application is registered.  By default the Xmanager 
     547;               keyword NO_BLOCK is set to 1 to provide access to the 
     548;               command line if active command  line processing is available. 
     549;               Note that setting BLOCK for this application will cause 
     550;               all widget applications to block, not only this 
     551;               application.  For more information see the NO_BLOCK keyword 
     552;               to XMANAGER. 
     553; @keyword UPDATECALLBACK Set this keyword to a string containing the name of 
     554;               a user-supplied procedure that will be called when the color 
     555;               table is updated by XLOADCT.  The procedure may optionally 
     556;               accept a keyword called DATA, which will be automatically 
     557;               set to the value specified by the optional UPDATECBDATA 
     558;               keyword. 
     559; @keyword UPDATECBDATA Set this keyword to a value of any type. It will be 
     560;               passed via the DATA keyword to the user-supplied procedure 
     561;               specified via the UPDATECALLBACK keyword, if any. If the 
     562;               UPDATECBDATA keyword is not set the value accepted by the 
     563;               DATA keyword to the procedure specified by UPDATECALLBACK 
     564;               will be undefined. 
     565; 
     566;- 
    556567 
    557568 
     
    597608  !p.color = nc -1              ;Foreground color 
    598609  !p.font = 0                   ;Hdw font 
    599   save_win = !d.window  ;Previous window 
     610  save_win = !d.window          ;Previous window 
    600611 
    601612  IF N_ELEMENTS(r_orig) LE 0 THEN BEGIN ;If no common, use current colors 
Note: See TracChangeset for help on using the changeset viewer.