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, 21 Mar 2024 13:59:59 +0200 Message-ID: <86y1ab23sw.fsf@gnu.org> References: <87msramv72.fsf@breatheoutbreathe.in> <86jzmejzfd.fsf@gnu.org> <87a5namqyz.fsf@breatheoutbreathe.in> <86cys63281.fsf@gnu.org> <87wmqelakx.fsf@breatheoutbreathe.in> <86bk7q2xye.fsf@gnu.org> <871q8lk2o7.fsf@breatheoutbreathe.in> <87o7bpi4c1.fsf@breatheoutbreathe.in> <867cid15wv.fsf@gnu.org> <87bk7phzdz.fsf@breatheoutbreathe.in> <8634t10woh.fsf@gnu.org> <87il1g5b8m.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="36442"; 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 21 13:01:59 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 1rnH7O-0009DY-BN for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Mar 2024 13:01:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rnH79-0007nJ-JU; Thu, 21 Mar 2024 08:01:43 -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 1rnH6w-0007k2-K5 for bug-gnu-emacs@gnu.org; Thu, 21 Mar 2024 08:01:36 -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 1rnH6o-00042t-83 for bug-gnu-emacs@gnu.org; Thu, 21 Mar 2024 08:01:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rnH7S-00014F-4d for bug-gnu-emacs@gnu.org; Thu, 21 Mar 2024 08:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Mar 2024 12:02: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.17110224634026 (code B ref 69602); Thu, 21 Mar 2024 12:02:02 +0000 Original-Received: (at 69602) by debbugs.gnu.org; 21 Mar 2024 12:01:03 +0000 Original-Received: from localhost ([127.0.0.1]:35301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnH6S-00012R-2z for submit@debbugs.gnu.org; Thu, 21 Mar 2024 08:01:03 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnH6M-00012B-Uk for 69602@debbugs.gnu.org; Thu, 21 Mar 2024 08:00:58 -0400 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 1rnH5c-0003jO-8p; Thu, 21 Mar 2024 08:00:08 -0400 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=ME2H9OZpadEHNcLWdU1TiU7E/FsbrySeKojyns2Zqt8=; b=dfxV4BbaXBkK3QP45GLb KDqxI/lS6lchfX5tnFIHsZaT7dlte7ntEzL80AG0gS8boTtgG4GhGRUxaj/1Zo1n4p3VQC67IsneV 53g1Pl5uF/gXsSI+iTUOKEVR6Qj49b/Uog2P5ZdE2ERWXNfkty8KJN8c+aKW/VmT5bTfTxglOgt74 m5ONz4UG2xBTmXKNKJZaZZcQjTMLkzrO2IuVsB/ERnK2qzudi97mZXxZkePMXFEirIJFb95Z4Jvcc BfriAM8Nz3fu8lrNL6pyyRa0+Y0+C2RP/aygK3tQy/733NHWb+xzdBRllf6qCBTaG2StetX2hVtgv JbaknRe8gNotkA==; In-Reply-To: <87il1g5b8m.fsf@breatheoutbreathe.in> (message from Joseph Turner on Wed, 20 Mar 2024 23:45:34 -0700) 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:281901 Archived-At: > From: Joseph Turner > Cc: 69602@debbugs.gnu.org, stephen.berman@gmx.net, juri@linkov.net > Date: Wed, 20 Mar 2024 23:45:34 -0700 > > > I had in mind a special variable (we'd need to mention it in NEWS and > > in the doc string of the relevant functions). Adding an argument is a > > heavier change, and I think it is not justified in this case, because > > I do agree with you that most, if not all, applications would want the > > coordinates to scale together with the image. > > Thanks for your feedback and your patience! > > Please see attached patch. Thanks. The tests you added have some problems: . you use thread-first, but don't require subr-x when compiling . the tests fail when run in batch mode . when invoked interactively in a GUI session, one test fails: F image--compute-map-and-original-map Test ‘image--compute-map’ and ‘image--compute-original-map’. (ert-test-failed ((should (equal (image--compute-map image) flipped-map)) :form (equal (((circle ... . 24) "a" (help-echo "A")) ((rect ... 162 . 149) "b" (help-echo "B")) ((poly . [6 29 7 22 13 15 21 10 31 7 ...]) "c" (help-echo "C"))) (((circle ... . 24) "a" (help-echo "A")) ((rect ... 161 . 149) "b" (help-echo "B")) ((poly . [5 29 6 22 12 15 20 10 30 7 ...]) "c" (help-echo "C")))) :value nil :explanation (list-elt 0 (list-elt 0 (cdr (car ...)))))) It looks like some pixels do not match exactly? Perhaps some tolerances need to be allowed?