]> git.eshelyaron.com Git - emacs.git/commit
bug#69992: Minor improvement to image map transformation logic
authorDavid Ponce <da_vid@orange.fr>
Sat, 30 Mar 2024 12:59:41 +0000 (13:59 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sat, 30 Mar 2024 19:37:03 +0000 (20:37 +0100)
commitb5a0fda08bad61c3aa89084df98e7ca4deccad68
treecd73883cb6803eac304f58aa5834c27cffcbc43b
parenta8b9cdaa914bcba588116cc4af65ce45dc13eea7
bug#69992: Minor improvement to image map transformation logic

* lisp/image.el (image--compute-rotation): New function.
(image--compute-map, image--compute-original-map): Use it.
Ensure all transformations are applied or undone according to what
Emacs does internally.  Call a transformation function only when
needed.  Fix doc string.
(image--scale-map, image--rotate-map): Assume effective scale
argument.
(image--rotate-coord): Improve doc string.
(image--flip-map): Remove no more used argument FLIP.

* test/lisp/image-tests.el (image-create-image-with-map): Use a
valid SVG image otherwise `image-size' will not return a valid
value and calculation of scale could fail.
(image-transform-map): Update according to changed signature of
`image--flip-map'.

(cherry picked from commit cc212ea314d45c98761ae7f68600ad8bf799ea36)
lisp/image.el
test/lisp/image-tests.el