[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make a drawing with Emacs

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 . "";)
>        (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...

> You can then display the generated image in the console using

Really? :O

And... how do I get just the .el file?

underground experts united

reply via email to

[Prev in Thread] Current Thread [Next in Thread]