From ec4f976e8e1c072d6d6e05d77009e79da9efe885 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Thu, 25 Aug 2022 16:38:14 +0200 Subject: [PATCH] Document how :map and :scale interacts in image maps * doc/lispref/display.texi (Image Descriptors): Mention problems with scaling (bug#50487). --- doc/lispref/display.texi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index d336cda6743..fde7274d591 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -5886,6 +5886,14 @@ When you click the mouse when the mouse pointer is over a hot-spot, an event is composed by combining the @var{id} of the hot-spot with the mouse event; for instance, @code{[area4 mouse-1]} if the hot-spot's @var{id} is @code{area4}. + +Note that the map's coordinates should reflect the displayed image +after all transforms have been done (rotation, scaling and so on), and +also note that Emacs (by default) performs auto-scaling of images, so +to make things match up, you should either specify @code{:scale 1.0} +when creating the image, or use the result of +@code{image-compute-scaling-factor} to compute the elements of the +map. @end table @defun image-mask-p spec &optional frame -- 2.39.2