GNU bug report logs -
#50487
Image :map area is not correct in Windows HiDPI environment
Previous Next
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50487 in the body.
You can then email your comments to 50487 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50487
; Package
emacs
.
(Thu, 09 Sep 2021 17:07:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
tsuucat <tsuucat <at> icloud.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 09 Sep 2021 17:07:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[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)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50487
; Package
emacs
.
(Sun, 12 Sep 2021 05:59:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 50487 <at> debbugs.gnu.org (full text, mbox):
[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.
After more investigation, it seems that this is not a problem limited
to the Windows High DPI environment. Because the function `find_hot_spot`
does not take :scale value into account, the area appears to be misaligned.
Either find_hot_spot needs to be adapted to take :scale into account, or we
need to document that :map only works well when :scale is 1.0.
--
tsuucat
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50487
; Package
emacs
.
(Thu, 25 Aug 2022 14:39:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 50487 <at> debbugs.gnu.org (full text, mbox):
tsuucat <tsuucat <at> icloud.com> writes:
> After more investigation, it seems that this is not a problem limited
> to the Windows High DPI environment. Because the function `find_hot_spot`
> does not take :scale value into account, the area appears to be misaligned.
>
> Either find_hot_spot needs to be adapted to take :scale into account, or we
> need to document that :map only works well when :scale is 1.0.
I've now mentioned image transforms and :scale in the :map node in the
manual in Emacs 29.
bug marked as fixed in version 29.1, send any further explanations to
50487 <at> debbugs.gnu.org and tsuucat <tsuucat <at> icloud.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 25 Aug 2022 14:40:01 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 23 Sep 2022 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 221 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.