From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#69602: 29.1; Image :map should adjust with :scale and :rotation Date: Thu, 07 Mar 2024 09:55:42 +0200 Message-ID: <86cys63281.fsf@gnu.org> References: <87msramv72.fsf@breatheoutbreathe.in> <86jzmejzfd.fsf@gnu.org> <87a5namqyz.fsf@breatheoutbreathe.in> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3769"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69602@debbugs.gnu.org, stephen.berman@gmx.net, juri@linkov.net To: Joseph Turner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 07 08:56:53 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 1ri8cW-0000o0-Mr for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Mar 2024 08:56:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ri8cD-0003C8-JF; Thu, 07 Mar 2024 02:56:33 -0500 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 1ri8cB-0003Bl-8r for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 02:56:31 -0500 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 1ri8cB-0002jp-0g for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 02:56:31 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ri8cg-0004vJ-1P for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 02:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Mar 2024 07:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69602 X-GNU-PR-Package: emacs Original-Received: via spool by 69602-submit@debbugs.gnu.org id=B69602.170979818518880 (code B ref 69602); Thu, 07 Mar 2024 07:57:02 +0000 Original-Received: (at 69602) by debbugs.gnu.org; 7 Mar 2024 07:56:25 +0000 Original-Received: from localhost ([127.0.0.1]:52380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ri8c5-0004uR-Cm for submit@debbugs.gnu.org; Thu, 07 Mar 2024 02:56:25 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ri8c3-0004uF-IT for 69602@debbugs.gnu.org; Thu, 07 Mar 2024 02:56:24 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ri8bR-0002Kq-9U; Thu, 07 Mar 2024 02:55:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=/FGb5XUZoQoK4Ol3gXxh3BeSFkENrUIqiuF0zRTfsKw=; b=NejuQ73n2UZlyoXQkO0Y sr8tKhpXPK0/g5cjama8U+2vCuA7EpmkGd68p8vku5h4qt1J92yRlEOs47qE//NcDNh+VZ6grg1rK snbjMo2URhiaNcxr83ecOaS19USnxwRCaPRiXhyv6wzkQ0VWxtPngKu5l74xhtHKYX1fHOpCTxa5z UYeqbqZtxp6t+HikQasWSJj3KlzFm8rv9aJcAIA8gjZd1Nv7GQutEJLtJ9zKysIqcSxmh14hdBoyC rzw5s8hh67jB+bFrVgZEUSbDeIzMdKHWtGvYfvYKIBbyGd4SXnm9usODwQfqdPiFR5KXO41d+Bz7l ESOdEM5hjkmyMA==; In-Reply-To: <87a5namqyz.fsf@breatheoutbreathe.in> (message from Joseph Turner on Wed, 06 Mar 2024 23:14:21 -0800) 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:281149 Archived-At: > From: Joseph Turner > Cc: 69602@debbugs.gnu.org, stephen.berman@gmx.net, juri@linkov.net > Date: Wed, 06 Mar 2024 23:14:21 -0800 > > Eli Zaretskii writes: > > The ELisp manual says about :map: > > > > Note that the map's coordinates should reflect the displayed image > > after all transforms have been done (rotation, scaling and so on), > > and also note that Emacs (by default) performs auto-scaling of > > images, so to make things match up, you should either specify > > ‘:scale 1.0’ when creating the image, or use the result of > > ‘image-compute-scaling-factor’ to compute the elements of the map. > > > > Can this technique help? > > Thank you for your help! > > When the user runs `image-increase-size', where should third-party code > recompute :map to fit the new image scale? > > There's no `image-after-change-size-hook' nor `image-after-rotate-hook'. I think the idea is to define the value of :map such that it runs image-compute-scaling-factor as part of computing the coordinates of the map.