Changeset 29 for trunk/ToBeReviewed/TRIANGULATION/tracemask.pro
- Timestamp:
- 05/02/06 15:32:01 (18 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/ToBeReviewed/TRIANGULATION/tracemask.pro
r27 r29 17 17 ; KEYWORD PARAMETERS: 18 18 ; 19 ; CONT_THICK: l''epaisseur du trait pour tracer les 19 ; COAST_COLOR: the color of the coastline. 20 ; defaut value is 0 => black 21 ; 22 ; COAST_THICK: l''epaisseur du trait pour tracer les 20 23 ; continents. par defaut c''est 1. 21 24 ; … … 36 39 ;------------------------------------------------------------ 37 40 ;------------------------------------------------------------ 38 PRO tracemask, maskentree, xin, yin, CONT_THICK = cont_thick, OVERPLOT = overplot, _extra = ex 39 xentree = xin 40 yentree = yin 41 PRO tracemask, maskentree, xin, yin, COAST_COLOR = coast_color, COAST_THICK = coast_thick, OVERPLOT = overplot, _extra = ex 42 ; 41 43 if keyword_set(overplot) then return 42 @common 44 ;--------------------------------------------------------- 45 @cm_general 46 IF NOT keyword_set(key_forgetold) THEN BEGIN 47 @updatekwd 48 ENDIF 49 ;--------------------------------------------------------- 43 50 tempsun = systime(1) ; pour key_performance 44 51 ; on s''afranchit des problemes de bord: … … 47 54 nx = tailleentree[1]+1 48 55 ny = tailleentree[2]+1 49 ; on agrandi le mask de une colonne a gauche et de une colonne a droite. 56 ; we check the input axis 57 IF n_elements(xin) EQ 0 THEN xentree = findgen(nx-1) ELSE xentree = xin 58 IF (size(xentree))[0] EQ 1 THEN xentree = xentree#replicate(1,ny-1) 59 IF n_elements(yin) EQ 0 THEN yentree = findgen(ny-1) ELSE yentree = yin 60 IF (size(yentree))[0] EQ 1 THEN yentree = replicate(1,nx-1)#yentree 61 ; on agrandi le mask de une colonne a gauche et de une colonne en bas 50 62 mask = intarr(tailleentree[1]+1, tailleentree[2]+1) 51 63 mask[1:tailleentree[1], 1:tailleentree[2]] = maskentree … … 105 117 ; boucle sur les points concernes et trace du segment 106 118 ; rq: on utilise plots au lieu de plot car plots est bcp plus rapide. 107 for pt = 0 , n_elements(lx)-1 do BEGIN119 for pt = 0L, n_elements(lx)-1 do BEGIN 108 120 i = lx[pt] & j = ly[pt] 109 121 plots, [xf[i, j-1], xf[i, j]], [yf[i, j-1], yf[i, j]] $ 110 , color=c_cote,thick=cont_thick, _extra = ex122 , color = coast_color, thick = coast_thick, _extra = ex 111 123 if pt LT 5 then begin 112 124 endif … … 129 141 print, 'temps tracemask: liste traits horizontaux', systime(1)-tempdeux 130 142 tempdeux = systime(1) ; pour key_performance =2 131 for pt = 0 , n_elements(lx)-1 do BEGIN143 for pt = 0L, n_elements(lx)-1 do BEGIN 132 144 i = lx[pt] & j = ly[pt] 133 145 plots, [xf[i-1, j], xf[i, j]], [yf[i-1, j], yf[i, j]] $ 134 , color=c_cote,thick=cont_thick, _extra = ex146 , color = coast_color, thick = coast_thick, _extra = ex 135 147 endfor 136 148 IF testvar(var = key_performance) EQ 2 THEN $
Note: See TracChangeset
for help on using the changeset viewer.