From: Eli Zaretskii <eliz@gnu.org>
To: Joseph Turner <joseph@breatheoutbreathe.in>
Cc: 69602@debbugs.gnu.org, stephen.berman@gmx.net, juri@linkov.net
Subject: bug#69602: 29.1; Image :map should adjust with :scale and :rotation
Date: Sat, 23 Mar 2024 09:58:51 +0200 [thread overview]
Message-ID: <86cyrlz8ec.fsf@gnu.org> (raw)
In-Reply-To: <877cht94sb.fsf@breatheoutbreathe.in> (message from Joseph Turner on Fri, 22 Mar 2024 17:11:17 -0700)
> From: Joseph Turner <joseph@breatheoutbreathe.in>
> Cc: 69602@debbugs.gnu.org, stephen.berman@gmx.net, juri@linkov.net
> Date: Fri, 22 Mar 2024 17:11:17 -0700
>
> > Thanks. The tests you added have some problems:
> >
> > . you use thread-first, but don't require subr-x when compiling
>
> I removed thread-first.
>
> > . the tests fail when run in batch mode
>
> I added (skip-unless (display-images-p)) to the two problematic tests,
> and it solved the issue on my machine.
Solves it here as well.
> > . 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?
>
> Interesting - does the result of `image-size` vary per machine?
I guess so. The transformations are AFAIK done in floating-point
arithmetics, so some minor inaccuracies are possible.
> In any case, I added `image-tests--map-equal' to compare image maps with
> some tolerance. Do the tests pass on your machine now?
Yes, they do now, thanks. However, there's a warning when compiling
the tests:
In image-tests--map-equal:
lisp/image-tests.el:192:17: Warning: Unused lexical variable `i'
Can you fix this, please?
next prev parent reply other threads:[~2024-03-23 7:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 5:37 bug#69602: 29.1; Image :map should adjust with :scale and :rotation Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-07 7:04 ` Eli Zaretskii
2024-03-07 7:14 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-07 7:55 ` Eli Zaretskii
2024-03-07 8:08 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-07 9:27 ` Eli Zaretskii
2024-03-07 13:53 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-08 7:02 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-08 8:31 ` Eli Zaretskii
2024-03-08 8:39 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-08 11:50 ` Eli Zaretskii
2024-03-21 6:45 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-21 11:59 ` Eli Zaretskii
2024-03-23 0:11 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-23 7:58 ` Eli Zaretskii [this message]
2024-03-23 17:41 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-23 17:58 ` Eli Zaretskii
2024-03-23 18:18 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-23 20:32 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-28 10:13 ` Eli Zaretskii
2024-03-08 7:24 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86cyrlz8ec.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=69602@debbugs.gnu.org \
--cc=joseph@breatheoutbreathe.in \
--cc=juri@linkov.net \
--cc=stephen.berman@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.