|
From: | Emanuel Berg |
Subject: | Re: make a drawing with Emacs |
Date: | Wed, 02 Sep 2020 23:51:37 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Tomas Hlavaty wrote: > Here is an alternative which works even on console without any graphics > toolkit compiled in: > > (require 'xml) > (with-temp-buffer > (xml-print > '((svg > ((xmlns . "http://www.w3.org/2000/svg") > (viewBox . "0 0 100 100")) > (circle > ((cx . "50") (cy . "50") (r . "20")))))) > (write-file "/tmp/a.svg")) > > The /tmp/a.svg file will contain the SVG image. > > Now the nice part of doing it in pure Elisp is that > you can refactor the code into useful functions as > you need. For example [...] Indeed, that works great! Thanks a lot! Now I just have to get the primitives from the W3C tutorial and then implement neat little Elisp wrappers for all the common stuff... https://dataswamp.org/~incal/emacs-init/svg-my.el > You can then display the generated image in the console using > https://logand.com/sw/emacs-framebuffer/file/emacs-framebuffer.el.html Really? :O And... how do I get just the .el file? -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
[Prev in Thread] | Current Thread | [Next in Thread] |