[Top][All Lists]

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

Re: Emacs canvas support

From: tomas
Subject: Re: Emacs canvas support
Date: Wed, 29 Apr 2020 20:51:28 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Apr 29, 2020 at 08:27:53PM +0300, Eli Zaretskii wrote:
> > Date: Wed, 29 Apr 2020 19:16:19 +0200
> > From: <address@hidden>
> > 
> > > Drawing over normal text, if we don't want to redesign the entire
> > > display engine, needs some new kind of "display element" ( a sibling
> > > to "character", "image", "stretch", etc.), one that doesn't
> > > necessarily have any effect on the metrics of the screen lines it is
> > > drawn upon.  I'm not sure I have a clear idea about what features such
> > > a drawing will need to support, but it could be possible to add such
> > > an element with not too much effort.  Would someone want to come up
> > > with a reasonable list of requirements for such a feature?
> > 
> > That sounds... exciting. Basically, Emacs would have to have a "display
> > list" of graphical elements to draw, each one perhaps having a bounding
> > box (to discard those from redisplay which aren't currently visible)
> > and perhaps a "layer" (more to the background or foreground).
> That's not how Emacs controls what's on display.  It basically
> represents each window as a 2D array of glyphs, each one of which has
> a certain graphical representation.

...a display list of sorts.

>                                     The representation itself is of
> no concern to the display engine (well, almost); the only thing it
> cares about is the metrics of each glyph, because that's what it needs
> to do layout calculations.

A graphical overlay wouldn't have "glyph metrics", the graphical
objects would (I think) have "absolute" [1] positions (possibly
precalculated by something else).

> We need to try to fit into this framework, if possible.

I think the "interesting" problem is to know (quickly) which
graphical objects intersect the (visible) window -- something
graphics programs do as their main job.


[1] Well, absolute is relative ;-) perhaps anchored at some text
   in the buffer, perhaps anchored to the window... I don't know.
-- tomás

Attachment: signature.asc
Description: Digital signature

reply via email to

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