emacs-devel
[Top][All Lists]
Advanced

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

Re: SVG hack for display engine


From: Eli Zaretskii
Subject: Re: SVG hack for display engine
Date: Wed, 17 Nov 2021 15:47:41 +0200

> From: Anand Tamariya <atamariya@gmail.com>
> Date: Wed, 17 Nov 2021 10:03:25 +0530
> Cc: Alexander Adolf <alexander.adolf@condition-alpha.com>, Emacs Devel 
> <emacs-devel@gnu.org>
> 
> Here's some details on how I think it might work. Emacs exposes two Lisp APIs:
> - svg-render (svg x y width height)
> svg is a Lisp DOM object as returned by (dom-node).

What code will produce that DOM object, and how will it be produced?

> This should use librsvg to generate a bitmap image of
> svg of size (width x height) and superimpose it at position (x, y) on the 
> current bitmap being displayed by
> Emacs. The current image API takes either a filename or XML string for SVG. 
> This can be avoided if svg is a
> Lisp DOM.
> 
> - svg-bbox (node)
> This returns the bounding box of the DOM node. This is basically a wrapper 
> around librsvg API.
> 
> Emacs also adds a hook, say, display-svg-hook which runs only on a graphical 
> display. Any mode can use
> this hook to display the SVG content using the above API.

Please describe the intended use of these APIs and the hook to provide
the display feature(s) you have in mind, and how will that work in
concert with the display engine.  I don't think I have a clear picture
of that yet.

Also, please describe what happens with use of these APIs when just a
small part of the Emacs display needs to be redrawn.

Thanks.



reply via email to

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