[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make a drawing with Emacs
From: |
Leo Butler |
Subject: |
Re: make a drawing with Emacs |
Date: |
Wed, 02 Sep 2020 20:26:22 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
> ********************************************************
> Caution: This message was sent from outside the University of Manitoba.
> ********************************************************
>
> 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?
Line 9 of the file:
Download: git clone https://logand.com/git/emacs-framebuffer.git
Interesting thread.
Leo
- Re: make a drawing with Emacs, (continued)
Re: make a drawing with Emacs, Emanuel Berg, 2020/09/01
Re: make a drawing with Emacs, Stefan Monnier, 2020/09/02
Re: make a drawing with Emacs, Emanuel Berg, 2020/09/03
Re: make a drawing with Emacs, Tomas Hlavaty, 2020/09/03
Re: make a drawing with Emacs, Stefan Monnier, 2020/09/03
Re: make a drawing with Emacs, Tomas Hlavaty, 2020/09/03
Re: make a drawing with Emacs, Stefan Monnier, 2020/09/03
Message not availableMessage not availableRe: make a drawing with Emacs, Tomas Hlavaty, 2020/09/04
Message not availableRe: make a drawing with Emacs, Lars Magne Ingebrigtsen, 2020/09/03
Message not availableRe: make a drawing with Emacs, Lars Magne Ingebrigtsen, 2020/09/03
Re: make a drawing with Emacs, Stefan Monnier, 2020/09/03