emacs-devel
[Top][All Lists]
Advanced

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

Re: Why Emacs should have a good web-browser


From: Chong Yidong
Subject: Re: Why Emacs should have a good web-browser
Date: Wed, 22 Jul 2009 14:07:24 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.96 (gnu/linux)

Stephen Eilert <address@hidden> writes:

> On Tue, Jul 21, 2009 at 8:05 PM, Chong Yidong<address@hidden> wrote:
>> Stephen Eilert <address@hidden> writes:
>>
>>> Or a way to create vector and bitmap images programatically (some
>>> Cairo-like elisp library, or bindings for Cairo itself).
>>
>> Emacs 23 can already do this, because it can be compiled with librsvg.
>>
>
> And how do I call it from elisp? I couldn't figure out how.

Here's an example:

(setq my-svg-data
      "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><svg 
xmlns:svg=\"http://www.w3.org/2000/svg\"; xmlns=\"http://www.w3.org/2000/svg\"; 
version=\"1.0\" width=\"223.51666\" height=\"223.76907\" id=\"svg2\"><defs 
id=\"defs4\" /><g transform=\"translate(-191.24778,-211.49836)\" 
id=\"layer1\"><path d=\"M 408.57145,369.50505 L 333.90781,368.26904 L 
290.56166,429.07444 L 268.66485,357.68315 L 197.44078,335.24841 L 
258.57144,292.36219 L 257.8987,217.69136 L 317.57633,262.5775 L 
388.38462,238.86313 L 364.13677,309.49051 L 408.57145,369.50505 z\" 
id=\"path2399\" 
style=\"opacity:1;fill:#ff0a0a;fill-opacity:0.264574;stroke:#000000;stroke-width:12.38599968;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1\"
 /></g></svg>")

(setq my-svg-descriptor (create-image my-svg-data 'svg t))
(insert-image my-svg-descriptor)




reply via email to

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