[Top][All Lists]

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

Re: Emacs canvas support

From: Eli Zaretskii
Subject: Re: Emacs canvas support
Date: Wed, 29 Apr 2020 13:10:11 +0300

> From: Po Lu <address@hidden>
> Cc: address@hidden
> Date: Wed, 29 Apr 2020 17:57:03 +0800
> > I've read the code and the docs, but I don't think I have a clear idea
> > of what "canvases" are and what would be their intended usage.
> > Perhaps consider starting the documentation with some introductory
> > comments and even a small tutorial.
> A canvas is an object that contains memory that can be painted to, and
> then displayed by setting it as the `display' text property.

That's the technical description of the implementation.  It doesn't
explain when  canvases can be useful and for what purposes.

> > It sounds like you are talking about a way to create images
> > dynamically, but then I don't understand why we need canvas-from-image,
> > for example.
> It's not really a way to create images dynamically, but rather paint to
> a section of the screen.

But the result of this painting is some graphical object, similar to
an image, that will be displayed within a buffer, right?

> > Also, is there support for clicking the mouse on a canvas?  I don't
> > see it.
> You can bind mouse events as usual.

Did I miss the code that tells Emacs the click was on a canvas?  E.g.,
if you click on a canvas, what does posn-object return when passed the
click event as its argument?

reply via email to

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