SVG in print.m

View: New views
1 Messages — Rating Filter:   Alert me  

SVG in print.m

by Francesco Potortì :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This simple patch adds the SVG type to the capabilities of print.m.   It
looks longer than necessary because it sorts extensions in alphabetical
order.

--- /home/pot/math/octavelib/utils/myprint.m~ 2007-09-21 12:48:05.000000000 +0200
+++ /home/pot/math/octavelib/utils/myprint.m 2007-09-21 12:40:57.000000000 +0200
@@ -69,20 +69,22 @@
 ##   @item cdr
 ##   @itemx corel
 ##     CorelDraw
-##   @item hpgl
-##     HP plotter language
-##   @item fig
-##     XFig
 ##   @item dxf
 ##     AutoCAD
+##   @item emf
+##     Microsoft Enhanced Metafile
+##   @item fig
+##     XFig
+##   @item hpgl
+##     HP plotter language
 ##   @item mf
 ##     Metafont
 ##   @item png
 ##     Portable network graphics
 ##   @item pbm
 ##     PBMplus
-##   @item emf
-##     Microsoft Enhanced Metafile
+##   @item svg
+##     Scalable vector graphics
 ##   @end table
 ##
 ##   Other devices are supported by "convert" from ImageMagick.  Type
@@ -191,7 +193,7 @@ function print (varargin)
   endif
 
   ## check if we have to use convert
-  dev_list = {"aifm", "corel", "fig", "png", "pbm", "dxf", "mf", ...
+  dev_list = {"aifm", "corel", "fig", "png", "pbm", "dxf", "mf", "svg", ...
       "hpgl", "ps", "ps2", "psc", "psc2", "eps", "eps2", ...
       "epsc", "epsc2", "emf", "pstex", "pslatex", ...
       "epslatex", "epslatexstandalone"};
@@ -327,8 +329,9 @@ function print (varargin)
 
     new_terminal = "png large";
 
-  elseif (strcmp (dev, "dxf") || strcmp (dev, "mf") || strcmp (dev, "hpgl"))
-    ## AutoCad DXF, METAFONT, HPGL
+  elseif (strcmp (dev, "dxf") || strcmp (dev, "mf") ...
+  || strcmp (dev, "hpgl") || strcmp (dev, "svg"))
+    ## AutoCad DXF, METAFONT, HPGL, SVG
     new_terminal = dev;
   endif

--
Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa         Email: Potorti@...
Web: http://fly.isti.cnr.it/           Key:   fly.isti.cnr.it/public.key
_______________________________________________
Octave-sources mailing list
Octave-sources@...
https://www.cae.wisc.edu/mailman/listinfo/octave-sources