From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: David Ponce via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69992: Minor improvement to image map transformation logic Date: Sat, 30 Mar 2024 09:55:59 +0100 Message-ID: <645a1ccd-868b-4e02-bfc3-0ce4ab6b8f38@orange.fr> References: <87o7b3m8ee.fsf@ushin.org> <55864577-3819-46e0-857a-cc0d0145bc2f@orange.fr> <86cyrfj0t3.fsf@gnu.org> <87cyrfl265.fsf@breatheoutbreathe.in> <182126ee-57b1-4a86-82c6-ba46e4b676cb@orange.fr> <8634s8dtrp.fsf@gnu.org> Reply-To: David Ponce Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30114"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 69992@debbugs.gnu.org, joseph@breatheoutbreathe.in To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 30 09:57:33 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rqUWr-0007fV-4V for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Mar 2024 09:57:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqUWP-00019e-Op; Sat, 30 Mar 2024 04:57:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqUWM-00019O-O6 for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2024 04:57:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rqUWM-00005M-Fo for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2024 04:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rqUWN-00006D-U0 for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2024 04:57:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David Ponce Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Mar 2024 08:57:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69992 X-GNU-PR-Package: emacs Original-Received: via spool by 69992-submit@debbugs.gnu.org id=B69992.171178896832674 (code B ref 69992); Sat, 30 Mar 2024 08:57:03 +0000 Original-Received: (at 69992) by debbugs.gnu.org; 30 Mar 2024 08:56:08 +0000 Original-Received: from localhost ([127.0.0.1]:43913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqUVU-0008Uu-3k for submit@debbugs.gnu.org; Sat, 30 Mar 2024 04:56:08 -0400 Original-Received: from smtp-20.smtpout.orange.fr ([80.12.242.20]:50779 helo=smtp.smtpout.orange.fr) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqUVP-0008UB-Tf for 69992@debbugs.gnu.org; Sat, 30 Mar 2024 04:56:07 -0400 Original-Received: from [192.168.1.15] ([2.7.71.181]) by smtp.orange.fr with ESMTPA id qUVLr9iYBCHlGqUVLrqeJ5; Sat, 30 Mar 2024 09:56:00 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1711788960; bh=ge9i/4N1JaSSILl+d6ooLa67ebMEpLd2qf3/JttPt+k=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=XyHKKz3v0i0G8DuB5PcElUQmK2ESZTcgp/Ywerd4p3aWV4ggyu1L+KRygzfmT6F8E zQiwzBgTQONkoQZ+cMzOa/WNiWmo/XJznal82aZ0CnzuNRD/C/LaSgABg3aIsgGRlh KNbD8t7EAlToKLYBUrUyyz20nFHr43zsL5mDG17EGnkFhtPyG747+c2vb7jh6xqMvY dj9ZepsOnrZ1DMzArTN8rnpnKCCE8NWS1nHg70VXI6aw6dq8zKj90TizVH3hreGEcg gFypRt2mvd7HX0g5dMuVRHyeeCp2R2vok4ODYpwVVfwhg7knIbu5G8EtHqYwwcnD9h 1zhwZuiG5cKZQ== X-ME-Helo: [192.168.1.15] X-ME-Auth: ZGFfdmlkQHdhbmFkb28uZnI= X-ME-Date: Sat, 30 Mar 2024 09:56:00 +0100 X-ME-IP: 2.7.71.181 Content-Language: fr, en-US In-Reply-To: <8634s8dtrp.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282336 Archived-At: On 30/03/2024 09:10, Eli Zaretskii wrote: >> Date: Fri, 29 Mar 2024 11:19:11 +0100 >> From: David Ponce >> Cc: Eli Zaretskii , Joseph Turner >> >>> The attached new patch fixes the logic to be consistent with Emacs >>> internal implementation, plus some other tweaks to check if a >>> transformation apply before to call the transformation function. >>> I also updated some tests according to functions changes. >>> Here is a possible change log: >>> >>> 2024-03-28  David Ponce  >>> >>>     * lisp/image.el (image--compute-scaling) >>>     (image--compute-rotation): New functions. >>>     (image--compute-map, image--compute-original-map): Use them. >>>     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): 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. >> [...] >> >> Hello, >> >> Please find attached a new patch with an additional small fix I forgot to >> include. Sorry. > > Thanks. Please resend with the updated commit log message, and I will > install it. Hello Eli, The change log is the same. The last patch include a slightly modified version of the new function `image--compute-rotation' to return 0 by default when no rotation is specified, instead of nil. Please let me know if you need anything else. Thanks!