From: Lars Ingebrigtsen Date: Thu, 25 Aug 2022 14:38:14 +0000 (+0200) Subject: Document how :map and :scale interacts in image maps X-Git-Tag: emacs-29.0.90~1893^2~39 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ec4f976e8e1c072d6d6e05d77009e79da9efe885;p=emacs.git Document how :map and :scale interacts in image maps * doc/lispref/display.texi (Image Descriptors): Mention problems with scaling (bug#50487). --- 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