Mercurial > hg > octave-nkf
changeset 7262:16e61aecddc1
[project @ 2007-12-05 20:50:47 by jwe]
author | jwe |
---|---|
date | Wed, 05 Dec 2007 20:50:47 +0000 |
parents | 42dc0f2acac1 |
children | cc0276c3269d |
files | doc/ChangeLog doc/interpreter/geometryimages.m doc/interpreter/interpimages.m doc/interpreter/sparseimages.m |
diffstat | 4 files changed, 42 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,10 @@ +2007-12-05 John W. Eaton <jwe@octave.org> + + * interpreter/geometryimages.m (image_as_txt): New function. + Use it to generate "figures" for Info format. + * interpreter/interpimages.m: Likewise. + * interpreter/sparseimages.m: Likewise. + 2007-12-04 John W. Eaton <jwe@octave.org> * interpreter/sparseimages.m, interpreter/plotimages.m,
--- a/doc/interpreter/geometryimages.m +++ b/doc/interpreter/geometryimages.m @@ -26,6 +26,8 @@ || strcmp (nm, "convhull") || strcmp (nm, "delaunay") || strcmp (nm, "triplot"))) sombreroimage (nm, typ); + elseif (strcmp (typ, "txt")) + image_as_txt (nm); elseif (strcmp (nm, "voronoi")) rand("state",9); x = rand(10,1); @@ -194,3 +196,13 @@ end_unwind_protect endif endfunction + +## generate something for the texinfo @image command to process +function image_as_txt(nm) + fid = fopen (sprintf ("%s.txt", nm), "wt"); + fputs (fid, "\n"); + fputs (fid, "+---------------------------------+\n"); + fputs (fid, "| Image unavailable in text mode. |\n"); + fputs (fid, "+---------------------------------+\n"); + fclose (fid); +endfunction
--- a/doc/interpreter/interpimages.m +++ b/doc/interpreter/interpimages.m @@ -21,7 +21,9 @@ if (strcmp (typ, "png")) set (0, "defaulttextfontname", "*"); endif - if (strcmp (nm, "interpft")) + if (strcmp (typ, "txt")) + image_as_txt (nm); + elseif (strcmp (nm, "interpft")) t = 0 : 0.3 : pi; dt = t(2)-t(1); n = length (t); k = 100; ti = t(1) + [0 : k-1]*dt*n/k; @@ -74,3 +76,13 @@ f = figure (1); set (f, "visible", "off"); endfunction + +## generate something for the texinfo @image command to process +function image_as_txt(nm) + fid = fopen (sprintf ("%s.txt", nm), "wt"); + fputs (fid, "\n"); + fputs (fid, "+---------------------------------+\n"); + fputs (fid, "| Image unavailable in text mode. |\n"); + fputs (fid, "+---------------------------------+\n"); + fclose (fid); +endfunction
--- a/doc/interpreter/sparseimages.m +++ b/doc/interpreter/sparseimages.m @@ -262,3 +262,13 @@ end_unwind_protect endif endfunction + +## generate something for the texinfo @image command to process +function image_as_txt(nm) + fid = fopen (sprintf ("%s.txt", nm), "wt"); + fputs (fid, "\n"); + fputs (fid, "+---------------------------------+\n"); + fputs (fid, "| Image unavailable in text mode. |\n"); + fputs (fid, "+---------------------------------+\n"); + fclose (fid); +endfunction