bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#69602: 29.1; Image :map should adjust with :scale and :rotation


From: Eli Zaretskii
Subject: bug#69602: 29.1; Image :map should adjust with :scale and :rotation
Date: Fri, 08 Mar 2024 09:24:28 +0200

> From: Joseph Turner <joseph@breatheoutbreathe.in>
> Cc: 69602@debbugs.gnu.org, stephen.berman@gmx.net, juri@linkov.net
> Date: Thu, 07 Mar 2024 05:53:11 -0800
> 
> > IOW, I don't understand why you think the problem can only be solved
> > in C: AFAIK almost all of the machinery that performs image transforms
> > is implemented in Lisp, and each time an image is rescaled, we
> > basically re-process the image descriptor anew.
> 
> The attached patch adds two hooks in `image.el' which allow packages to
> recompute an image's map after it's rescaled or rotated.

Thanks, but please accompany the code change with suitable changes for
NEWS and the ELisp manual.  Bonus points for adding tests for this to
our test suite.

Also, I think we don't need the "after" part in the names of these two
hooks: their doc strings explicitly document that they are run after
the transformation, and image-change-size-hook is easier to remember,
since the name basically says "a hook run when image is resized".

And finally, please mention the hooks in the doc strings of public
functions that perform size-changes and rotations of images, as we
usually do with other hooks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]