[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69992: Minor improvement to image map transformation logic
From: |
Joseph Turner |
Subject: |
bug#69992: Minor improvement to image map transformation logic |
Date: |
Sat, 30 Mar 2024 12:07:05 -0700 |
David Ponce <da_vid@orange.fr> writes:
> Here is my last patch. The only change compared to the previous patch is that
> now the scale factor is correctly calculated based on the size of the image
> and
> the displayed size. To minimize the performance impact, I saved a call to
> `image-size' by doing the calculation directly in the `image--compute-map' and
> `image--compute-original-map' functions. I did some benchmarks and the
> difference is not significant. The tests still give the same results :-)
Thank you for these fixes and optimizations!!! The tests pass for me.
> Here is the new change log:
>
> 2024-03-30 David Ponce <da_vid@orange.fr>
>
> * 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.
With this fix, I think we can remove `image-tests--map-equal'. I'll
submit a new bug.
> (image--scale-map): Assume effective scale argument.
> (image--rotate-map): Assume effective rotation argument.
> (image--rotate-coord): Improve doc string.
> (image--flip-map): Remove no more used flip argument.
>
> * 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.
>
> Thanks!
>
> [2. text/x-patch; image-compute-map-V2.patch]...
- bug#69992: Minor improvement to image map transformation logic, (continued)
- bug#69992: Minor improvement to image map transformation logic, Eli Zaretskii, 2024/03/27
- bug#69992: Minor improvement to image map transformation logic, David Ponce, 2024/03/27
- bug#69992: Minor improvement to image map transformation logic, Joseph Turner, 2024/03/27
- bug#69992: Minor improvement to image map transformation logic, David Ponce, 2024/03/27
- bug#69992: Minor improvement to image map transformation logic, David Ponce, 2024/03/28
- bug#69992: Minor improvement to image map transformation logic, David Ponce, 2024/03/29
- bug#69992: Minor improvement to image map transformation logic, Eli Zaretskii, 2024/03/30
- bug#69992: Minor improvement to image map transformation logic, David Ponce, 2024/03/30
- bug#69992: Minor improvement to image map transformation logic, David Ponce, 2024/03/30
- bug#69992: Minor improvement to image map transformation logic, Eli Zaretskii, 2024/03/30
- bug#69992: Minor improvement to image map transformation logic,
Joseph Turner <=