From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: Q on performance with 10000 faces
Date: Mon, 22 May 2006 06:47:17 -0700 [thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICGEIADGAA.drew.adams@oracle.com> (raw)
In-Reply-To: <m3psi6qxuh.fsf@kfs-l.imdomain.dk>
> I guess one alternative would be to insert an image of a
> complete palette (like the image attached)
You can construct that image on the fly using eg. XPM format.
Where can I find doc to tell me how to do that? Anything in Emacs about it,
or should I just google for "xpm"?
To overcome limitations in number of available colors, you could
construct 100 images covering one line each.
What are the limitations you refer to here? I'm not clear how 100 single-row
images would be better than one 110-row image. Is it because the number of
colors is somehow limited per line?
Then use the line-height property of the newline character to
make the display "tight":
(insert (propertize "\n" 'line-height t)))))
BTW, why does that work for images but not, apparently, for text lines? At
least it didn't seem to work for me - see bug report yesterday.
Finally, you may use the :map property on images:
`:map MAP'
This associates an image map of "hot spots" with this image.
That's what I couldn't find (what I meant by HTML image maps). Thx.
An image map is an alist where each element has the format `(AREA
ID PLIST)'. An AREA is specified as either a rectangle, a circle,
or a polygon.
A rectangle is a cons `(rect . ((X0 . Y0) . (X1 . Y1)))' which
specifies the pixel coordinates of the upper left and bottom right
corners of the rectangle area.
A circle is a cons `(circle . ((X0 . Y0) . R))' which specifies
the center and the radius of the circle; R may be a float or
integer.
A polygon is a cons `(poly . [X0 Y0 X1 Y1 ...])' where each pair
in the vector describes one corner in the polygon.
When the mouse pointer is above a hot-spot area of an image, the
PLIST of that hot-spot is consulted; if it contains a `help-echo'
property it defines a tool-tip for the hot-spot, and if it contains
a `pointer' property, it defines the shape of the mouse cursor when
it is over the hot-spot. *Note Pointer Shape::, for available
pointer shapes.
When you click the mouse when the mouse pointer is over a
hot-spot, an event is composed by combining the ID of the hot-spot
with the mouse event; for instance, `[area4 mouse-1]' if the
hot-spot's ID is `area4'.
Or simply use a common mouse click function and use the x,y coordinates
of the mouse event to calculate which color is clicked.
See posn-x-y and posn-object-x-y.
That's what I meant. That would be my next move: just use the image I sent,
knowing that it fits over the character grid I made originally and that I
can record the colors of.
next prev parent reply other threads:[~2006-05-22 13:47 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-22 0:02 Q on performance with 10000 faces Drew Adams
2006-05-22 3:41 ` Eli Zaretskii
2006-05-22 6:26 ` Drew Adams
2006-05-22 6:42 ` Miles Bader
2006-05-22 13:39 ` Drew Adams
2006-05-22 8:15 ` Kim F. Storm
2006-05-22 13:47 ` Drew Adams [this message]
2006-05-22 12:59 ` Stefan Monnier
2006-05-22 13:49 ` Drew Adams
2006-05-22 18:45 ` Eli Zaretskii
2006-05-22 18:44 ` Eli Zaretskii
2006-06-02 15:04 ` Drew Adams
2006-06-03 1:43 ` Drew Adams
2006-06-04 22:39 ` Kim F. Storm
2006-06-05 0:29 ` Drew Adams
2006-06-05 21:35 ` Kim F. Storm
2006-06-06 6:53 ` Drew Adams
2006-05-22 18:41 ` Eli Zaretskii
2006-05-22 20:59 ` Drew Adams
2006-05-22 22:30 ` Drew Adams
2006-05-22 23:28 ` Kevin Rodgers
2006-05-23 0:41 ` Drew Adams
2006-05-23 0:43 ` Luc Teirlinck
2006-05-23 1:25 ` Drew Adams
2006-05-25 16:21 ` Drew Adams
2006-05-23 11:08 ` Stefan Monnier
2006-05-23 14:07 ` Drew Adams
2006-05-23 23:48 ` Luc Teirlinck
2006-05-24 0:02 ` Drew Adams
2006-05-23 19:00 ` Eli Zaretskii
2006-05-23 21:06 ` Stefan Monnier
2006-05-24 5:50 ` Richard Stallman
2006-05-24 12:02 ` Stefan Monnier
2006-05-25 0:36 ` Richard Stallman
2006-05-25 3:22 ` Eli Zaretskii
2006-05-25 16:31 ` Richard Stallman
2006-05-22 15:12 ` Richard Stallman
2006-05-22 15:18 ` Drew Adams
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=DNEMKBNJBGPAOPIJOOICGEIADGAA.drew.adams@oracle.com \
--to=drew.adams@oracle.com \
/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.