emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs canvas support


From: tomas
Subject: Re: Emacs canvas support
Date: Thu, 30 Apr 2020 14:50:16 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Apr 30, 2020 at 08:03:35AM -0400, Stefan Monnier wrote:
> > This is sounding more and more like a compositor :-)
> 
> Yes, the combination of the glyph matrix and the canvas is done by
> "a compositor", indeed.  But it's a kind of "trivial" version of
> a compositor, and it's a very small part of the work (the work taking
> place mostly on the canvas side where we'll need to draw at positions
> that depend on the glyph matrix).

Yes, one would probably want to anchor a graphics object to some
position in the (text) buffer.

> > Nit: perhaps we'd like to have pics below as well as above text.
> 
> Not sure if the benefit is worth adding complexity for that.
> But maybe it's easy and natural to make the layering between glyph
> matrix and canvas into an arbitrary stack of layers.

AFAIK Cairo supports painting on layers; so each graphics object
could carry a layer (encoded e.g. as an int) and drawing operations
could proceed sorted by that.

> E.g. I could imagine a design where windows can display a stack of
> buffers layered one on top of the other (where typically only one of
> them contains text and the rest only contains canvas objects).
> But "synchronizing" the canvas in one buffer with the text in the other
> buffer would likely be more difficult than if we add a canvas "overlay"
> directly to the buffers.

I envision the thing rather as a collection of graphics objects which
are rendered to the same surface as the text. The Cairo backend makes
that easy, but I don't see why a plain X backend would prevent that
either (I have no idea about how things are on Windows or Mac).

Cheers
-- tomás

Attachment: signature.asc
Description: Digital signature


reply via email to

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