GNU bug report logs - #50487
Image :map area is not correct in Windows HiDPI environment

Previous Next

Package: emacs;

Reported by: tsuucat <tsuucat <at> icloud.com>

Date: Thu, 9 Sep 2021 17:07:01 UTC

Severity: normal

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: tsuucat <tsuucat <at> icloud.com>
To: 50487 <at> debbugs.gnu.org
Subject: bug#50487: Image :map area is not correct in Windows HiDPI environment
Date: Thu, 09 Sep 2021 17:05:53 -0000
[Message part 1 (text/plain, inline)]
Emacs version: 28.0.50

Window system: Windows (Windows 10)



Image descriptors :map can create hot-spot for an image.

The area will be specified as (rect . ((0 . 0) . (200 . 300))), but
this will not be reflected correctly in my HiDPI environment.


Reproduce steps:

1: eval following to insert image.

```

(require 'svg)
(let ((start (point))
      (end (progn (insert "x") (point))))
  (put-text-property
   start end 'display
   (let ((svg (svg-create 400 300)))
     (svg-rectangle svg 0 0 200 300 :fill "blue")
     (svg-rectangle svg 200 0 200 300 :fill "green")
     (svg-image svg :map '(((rect . ((0 . 0) . (200 . 300))) left-area (help-echo "left-area"))
               ((rect . ((200 . 0) . (400 . 300))) right-area (help-echo "right-area")))))))
```

2: move mouse cursor on image.

expected: when mouse is on blue rectangle area, tool-tip "left-area" appears.
actual: The area which tool-tip "left-area" appears doesn't match blue rectangle area.

The area which tool-tip "left-area"appears is smaller than expected.



My screen scale is 200%. If I change the scale to 100%, Emacs works
correctly. So I think this is HiDPI-related problem.



--

tsuucat
[Message part 2 (text/html, inline)]

This bug report was last modified 2 years and 268 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.