Changeset 118 for trunk/SRC/Postscript
- Timestamp:
- 06/27/06 17:47:06 (18 years ago)
- Location:
- trunk/SRC/Postscript
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Postscript/closeps.pro
- Property svn:keywords changed from Author Date Id Revision to Id
r114 r118 12 12 ; 13 13 ; @keyword INFOWIDGET A long integer giving the id of the information 14 ; widget (created by openps) that we have de destroy at 14 ; widget (created by openps) that we have de destroy at 15 15 ; the end of closeps (when the postscript is done) 16 16 ; … … 19 19 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 20 20 ; 21/12/98 21 ; June 2005: Sebastien Masson, english version with new commons 21 ; June 2005: Sebastien Masson, english version with new commons 22 ; 23 ; @version $Id$ 24 ; 22 25 ;- 23 26 ;------------------------------------------------------------ … … 40 43 ;------------------------------------------------------------ 41 44 ; if archive_ps /= 0 we will add its name and the date at the bottom 42 ; left corner of the page (in case if the postscript will be archived 43 ; in printps 45 ; left corner of the page (in case if the postscript will be archived 46 ; in printps 44 47 ;------------------------------------------------------------ 45 48 IF keyword_set(archive_ps) THEN BEGIN 46 49 ;------------------------------------------------------------ 47 ; we get the name of the latest created postscript. 50 ; we get the name of the latest created postscript. 48 51 ;------------------------------------------------------------ 49 52 psdir = isadirectory(psdir, title = 'Select psdir') … … 95 98 'WIN': SET_PLOT, thisOS 96 99 ELSE: SET_PLOT, 'X' 97 ENDCASE 100 ENDCASE 98 101 def_myuniquetmpdir 99 102 colorfile = myuniquetmpdir + 'original_colors.dat' -
trunk/SRC/Postscript/openps.pro
- Property svn:keywords changed from Author Date Id Revision to Id
r114 r118 11 11 ; @keyword FILENAME to define the name of the postcript file through 12 12 ; a keyword rather than with nameps inut argument 13 ; (in this case the keyword can be pass through 13 ; (in this case the keyword can be pass through 14 14 ; different routines via _extra keyword). 15 15 ; … … 21 21 ; @keyword KEEP_PFONT activate to suppress the modification of !p.font 22 22 ; (by defaut we force !p.font = 0 to make smaller postscripts) 23 ; @keyword PORTRAIT 24 ; @keyword LANDSCAPE 23 25 ; @keyword KEEPPFONT same as keep_pfont 24 26 ; 25 27 ; @keyword LIGHTNESS a scalar used to change the Lightness of the color 26 28 ; palette to be abble to adjust according to the printer we use, 27 ; the media (paper or slide)... 29 ; the media (paper or slide)... 28 30 ; lightness < 1 to get lighter colors 29 31 ; > 1 to get darker colors 30 32 ; 31 ; @keyword _EXTRA :used to pass any keyword to device procedure.32 ; 33 ; uses cm_4ps33 ; @keyword _EXTRA used to pass any keyword to device procedure. 34 ; 35 ; @uses cm_4ps 34 36 ; 35 37 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) … … 37 39 ; 1/2/98: ajout de nameps en input 38 40 ; 1/9/1999: ajout du mot cle FILENAME et du widget 39 ; June 2005: Sebastien Masson, cleaning, english version with new commons 41 ; June 2005: Sebastien Masson, cleaning, english version with new commons 42 ; 43 ; @version $Id$ 44 ; 40 45 ;- 41 46 ;------------------------------------------------------------ … … 92 97 nameps = isafile(nameps, iodir = psdir, /new) 93 98 ;------------------------------------------------------------ 94 ; we define xsize, ysize, xoffset et yoffset 99 ; we define xsize, ysize, xoffset et yoffset 95 100 ;------------------------------------------------------------ 96 101 IF n_elements(portrait) NE 0 OR n_elements(landscape) NE 0 THEN $ … … 102 107 xoff = 0. 103 108 yoff = 0. 104 ENDIF ELSE BEGIN 109 ENDIF ELSE BEGIN 105 110 xs = max(page_size) 106 111 ys = min(page_size) 107 112 xoff = 0. 108 113 yoff = max(page_size) 109 ENDELSE 114 ENDELSE 110 115 ;------------------------------------------------------------ 111 116 ; We define the device of the postscript mode … … 117 122 ; to make smaller postcripts 118 123 IF NOT (keyword_set(keeppfont) OR keyword_set(keep_pfont)) $ 119 THEN !p.font = 0 124 THEN !p.font = 0 120 125 ; show some informations 121 126 IF arg_present(infowidget) THEN $ -
trunk/SRC/Postscript/printps.pro
- Property svn:keywords set to Id
r114 r118 4 4 ;+ 5 5 ; 6 ; 7 ; 6 ; @file_comments 8 7 ; - archiving possibilities - 9 ; 8 ; 10 9 ; if archive_ps (common variable of cm_4ps) ne 0 then the postscript 11 10 ; can be saved for archiving if it is printed or if the button … … 19 18 ; @categories for the postscripts 20 19 ; 20 ; @param event 21 ; 21 22 ; @restrictions 22 23 ; … … 38 39 ; 25/8/19999 utilisation des widgets 39 40 ; 8/9/1999 utilisation de cw_bgroup 40 ; June 2005: Sebastien Masson: cleaning, english version with new commons 41 ; June 2005: Sebastien Masson: cleaning, english version with new commons 42 ; 43 ; @version $Id$ 44 ; 41 45 ;- 42 46 ;------------------------------------------------------------ … … 59 63 CASE uval.name OF 60 64 ;------------------------------------------------------------ 61 ; visualize case : postscript visualization 62 ;------------------------------------------------------------ 63 'visualize':BEGIN 65 ; visualize case : postscript visualization 66 ;------------------------------------------------------------ 67 'visualize':BEGIN 64 68 ; paper orientation 65 69 if key_portrait EQ 1 then ori = 'portrait' ELSE ori = 'seascape' … … 97 101 round(10*(43.18 + 27.94)) : papsize = 'ledger' 98 102 ELSE:papsize = 'a4' 99 ENDCASE 103 ENDCASE 100 104 ; call the viewers 101 105 CASE event.value OF … … 104 108 'Kghostview':spawn, '\kghostview '+uval.nameps 105 109 ENDCASE 106 return 110 return 107 111 END 108 112 ;------------------------------------------------------------ 109 113 ; print case: print and archive the file if needed 110 114 ;------------------------------------------------------------ 111 'print':BEGIN 115 'print':BEGIN 112 116 ; printer selection 113 117 printer = printer_machine_names[event.value] … … 131 135 END 132 136 ELSE: 133 ENDCASE 137 ENDCASE 134 138 ; we destroy the widget 135 widget_control, event.top, /destroy 139 widget_control, event.top, /destroy 136 140 ; if the file was originaly gzipped, then we re-gzip it and exit 137 141 IF uval.gzip THEN BEGIN … … 176 180 spawn, '\gzip ' + uval.nameps 177 181 ENDIF 178 ; 182 ; 179 183 return 180 184 end … … 187 191 ; visualize and/or print and/or archive. It can also refer 188 192 ; to a gzipped postscript file. If needed, this name will 189 ; be completed by .ps and/or .gz 193 ; be completed by .ps and/or .gz 190 194 ; 191 195 ; @uses cm_4ps … … 198 202 ; 25/8/19999 utilisation des widgets 199 203 ; 8/9/1999 utilisation de cw_bgroup 200 ; June 2005: Sebastien Masson: cleaning, english version with new commons 204 ; June 2005: Sebastien Masson: cleaning, english version with new commons 205 ; 206 ; @version $Id$ 207 ; 201 208 ;- 202 209 ;------------------------------------------------------------ … … 209 216 ; 210 217 thisOS = strupcase(strmid(!version.os_family, 0, 3)) 211 CASE thisOS OF 218 CASE thisOS OF 212 219 'MAC':return 213 220 'WIN':return … … 236 243 END 237 244 1: nameps = psfilename 238 ELSE: BEGIN 245 ELSE: BEGIN 239 246 ras = report('printps accept only one element: psfilename') 240 247 RETURN 241 END 242 ENDCASE 248 END 249 ENDCASE 243 250 ;------------------------------------------------------------ 244 251 ; we check if the file is exist in psdir. if necessary we complete … … 246 253 ;------------------------------------------------------------ 247 254 nameps = find(nameps+'{.ps,}{.gz,}', iodir = psdir, /nopro) 248 IF nameps EQ 'NOT FOUND' THEN BEGIN 255 IF nameps EQ 'NOT FOUND' THEN BEGIN 249 256 ng = report('file '+nameps+'[.ps][.gz] does not exist ') 250 257 return 251 ENDIF 258 ENDIF 252 259 gzipped = strpos(nameps, '.gz') 253 260 ; if the file is gzipped we call gunzip et change its name … … 264 271 psviewers = ['no psviewers found'] 265 272 IF file_which(getenv('PATH'), 'ghostview') NE '' THEN $ 266 psviewers = [psviewers, 'Ghostview'] 273 psviewers = [psviewers, 'Ghostview'] 267 274 IF file_which(getenv('PATH'), 'gs') NE '' THEN $ 268 psviewers = [psviewers, 'Ghostscript'] 275 psviewers = [psviewers, 'Ghostscript'] 269 276 IF file_which(getenv('PATH'), 'kghostview') NE '' THEN $ 270 psviewers = [psviewers, 'Kghostview'] 277 psviewers = [psviewers, 'Kghostview'] 271 278 ; if at least one of viewer was found we define these buttons 272 IF n_elements(psviewers) GT 1 THEN BEGIN 279 IF n_elements(psviewers) GT 1 THEN BEGIN 273 280 psviewers = psviewers[1:*] 274 281 notused = cw_bgroup(base, psviewers, /frame, label_top = 'Visualize' $ 275 282 , uvalue = {name:'visualize', nameps:nameps} $ 276 283 , /column, /return_name) 277 ENDIF 284 ENDIF 278 285 ; printers list grouped buttons 279 286 ; are the common variables printer_human_names and printer_human_names
Note: See TracChangeset
for help on using the changeset viewer.