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
1 moved

Legend:

Unmodified
Added
Removed
  • 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; 
Note: See TracChangeset for help on using the changeset viewer.