Mercurial > hg > octave-lyh
comparison scripts/plot/print.m @ 11667:bc4b8d973a3a release-3-0-x
print.m: handle gif and jpg devices
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 29 Feb 2008 04:09:03 -0500 |
parents | ad944c3cc888 |
children |
comparison
equal
deleted
inserted
replaced
11666:93d17b1e756f | 11667:bc4b8d973a3a |
---|---|
80 ## HP plotter language | 80 ## HP plotter language |
81 ## @item mf | 81 ## @item mf |
82 ## Metafont | 82 ## Metafont |
83 ## @item png | 83 ## @item png |
84 ## Portable network graphics | 84 ## Portable network graphics |
85 ## @item jpg | |
86 ## @itemx jpeg | |
87 ## JPEG image | |
88 ## @item gif | |
89 ## GIF image | |
85 ## @item pbm | 90 ## @item pbm |
86 ## PBMplus | 91 ## PBMplus |
87 ## @item svg | 92 ## @item svg |
88 ## Scalable vector graphics | 93 ## Scalable vector graphics |
89 ## @item pdf | 94 ## @item pdf |
216 elseif (strcmp (dev, "cdr")) | 221 elseif (strcmp (dev, "cdr")) |
217 dev = "corel"; | 222 dev = "corel"; |
218 endif | 223 endif |
219 | 224 |
220 ## check if we have to use convert | 225 ## check if we have to use convert |
221 dev_list = {"aifm", "corel", "fig", "png", "pbm", "dxf", "mf", "svg", ... | 226 dev_list = {"aifm", "corel", "fig", "png", "jpg", "jpeg", ... |
222 "hpgl", "ps", "ps2", "psc", "psc2", "eps", "eps2", ... | 227 "gif", "pbm", "dxf", "mf", "svg", "hpgl", ... |
223 "epsc", "epsc2", "emf", "pstex", "pslatex", ... | 228 "ps", "ps2", "psc", "psc2", "eps", "eps2", ... |
224 "epslatex", "epslatexstandalone", "pdf"}; | 229 "epsc", "epsc2", "emf", "pdf", "pslatex", ... |
230 "epslatex", "epslatexstandalone", "pstex"}; | |
225 convertname = ""; | 231 convertname = ""; |
226 [idx, errmsg] = cellidx (dev_list, dev); | 232 [idx, errmsg] = cellidx (dev_list, dev); |
227 if (! idx) | 233 if (! idx) |
228 if (! isempty (devopt)) | 234 if (! isempty (devopt)) |
229 convertname = strcat (devopt, ":", name); | 235 convertname = strcat (devopt, ":", name); |
335 options = strcat (options, " ", fontsize); | 341 options = strcat (options, " ", fontsize); |
336 endif | 342 endif |
337 | 343 |
338 new_terminal = strcat ("emf ", options); | 344 new_terminal = strcat ("emf ", options); |
339 | 345 |
340 elseif (strcmp (dev, "png") || strcmp (dev, "pbm")) | 346 elseif (strcmp (dev, "png") || strcmp (dev, "gif") |
347 || strcmp (dev, "jpg") || strcmp (dev, "jpeg") | |
348 || strcmp (dev, "pbm")) | |
349 if (strcmp (dev, "jpg")) | |
350 dev = "jpeg"; | |
351 endif | |
341 ## Portable network graphics, PBMplus | 352 ## Portable network graphics, PBMplus |
342 | 353 |
343 ## FIXME -- New PNG interface takes color as "xRRGGBB" | 354 ## FIXME -- New PNG interface takes color as "xRRGGBB" |
344 ## where x is the literal character 'x' and 'RRGGBB' are the red, | 355 ## where x is the literal character 'x' and 'RRGGBB' are the red, |
345 ## green and blue components in hex. For now we just ignore it | 356 ## green and blue components in hex. For now we just ignore it |