emacs-devel
[Top][All Lists]
Advanced

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

Re: Stylus drawing input?


From: Dov Grobgeld
Subject: Re: Stylus drawing input?
Date: Tue, 24 Jan 2023 17:55:15 +0200

Thanks! I had a look at it and it seems that it shows the rendering
part of issue number 1. I.e. by expressing the vector graphics as svg
we can generate an image and insert it into the buffer. It might also
solve number 4, if I can figure out how to make it draw antialiased in
a single color.

But I still don't understand how emacs can display such an image as an
"overlay" on top of other buffer contents. E.g. if I have an RGBA
image (or svg object) containing the stroke of the stylus. How can I
display that "above" the pdf display window? Does emacs support the
notion of layers?

(Having the notion of layers would also be nice for doing
presentations in emacs, as you can then have some static graphics as a
background image.)

Regards,
Dov



On Tue, Jan 24, 2023 at 2:27 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Dov Grobgeld <dov.grobgeld@gmail.com>
> > Date: Tue, 24 Jan 2023 10:03:02 +0200
> > Cc: emacs-devel@gnu.org, tomas@tuxteam.de
> >
> > Thanks. I need some guidance on how feasible the following is and how
> > I would go about doing it.
> >
> > 1. How do I draw vector graphics object in an emacs buffer. I.e.
> > line-to, move-to, close-path, fill etc. Do I need to generate the
> > pixels on my own (can be done e.g. with the agg library or with
> > libcairo) and then place the image as on overlay (how?), or is there
> > higher lever interface? Is it accessible from elisp or from C?
> > 2. How can I trace the x,y input coordinates of mouse movement. E.g.
> > I'd like to run a command to enter capture mode, and then catch
> > subsequent motion events of the mouse, until the mouse button is
> > raised. The resulting object should be a list of motion coordinates.
> > 3. How would I do the same for a stylus while catching additional pressure 
> > data?
> > 4. Given some vector graphics objects drawn on the screen, how would I
> > do mouse hit detection, so that doing a mouse click on the object,
> > returns the object id? (This I can do "offline" though, by drawing a
> > "label image" of the buffer contents on mouse press end then finding
> > the label of the object under the mouse.)
>
> Does the svg.el library help with some of the above?



reply via email to

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