From: Po Lu <luangruo@yahoo.com>
To: Dov Grobgeld <dov.grobgeld@gmail.com>
Cc: emacs-devel@gnu.org, tomas@tuxteam.de
Subject: Re: Stylus drawing input?
Date: Tue, 24 Jan 2023 18:50:09 +0800 [thread overview]
Message-ID: <87ilgw436m.fsf@yahoo.com> (raw)
In-Reply-To: <CA++fsGEGfKu_baZw7LcqPNUGtWtgduk4ZGh3GbH_9V0pyt=jLg@mail.gmail.com> (Dov Grobgeld's message of "Tue, 24 Jan 2023 10:03:02 +0200")
Dov Grobgeld <dov.grobgeld@gmail.com> writes:
> 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?
Emacs doesn't have any built in vector graphics capability. But the
image route could probably work, yes.
> 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.
I suggest reading through looking the entirety of (elisp)Input Events.
It will explain everything better than I can.
> 3. How would I do the same for a stylus while catching additional
> pressure data?
I will see what interfaces the X Input extension provides to access that
information and ack.
> 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.)
I think you had better head to the nearest library (or perhaps book
store) for this one. That is outside of the scope of this list.
next prev parent reply other threads:[~2023-01-24 10:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-12 6:39 Stylus drawing input? Dov Grobgeld
2023-01-14 6:06 ` Richard Stallman
2023-01-14 8:17 ` Dr. Arne Babenhauserheide
2023-01-14 9:38 ` Peter
2023-01-14 9:57 ` Eli Zaretskii
2023-01-14 10:49 ` Dr. Arne Babenhauserheide
2023-01-15 5:13 ` Richard Stallman
2023-01-16 7:41 ` Dr. Arne Babenhauserheide
2023-01-16 7:45 ` Dr. Arne Babenhauserheide
2023-01-16 8:26 ` tomas
2023-01-23 21:15 ` Dov Grobgeld
2023-01-23 23:48 ` Po Lu
2023-01-24 8:03 ` Dov Grobgeld
2023-01-24 10:50 ` Po Lu [this message]
2023-01-24 12:27 ` Eli Zaretskii
2023-01-24 15:55 ` Dov Grobgeld
2023-01-24 17:00 ` Eli Zaretskii
2023-01-14 9:50 ` Po Lu
2023-01-15 5:13 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ilgw436m.fsf@yahoo.com \
--to=luangruo@yahoo.com \
--cc=dov.grobgeld@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=tomas@tuxteam.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.