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#46556: 27.1; transparent images are displayed incorrectly if rotated Date: Wed, 17 Feb 2021 22:26:36 +0200 Message-ID: <83pn0y5tkz.fsf@gnu.org> References: <86mtw4tiyg.fsf@gmail.com> <87sg5ww430.fsf@gnus.org> <83blci7hgd.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4800"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, alan@idiocy.org, 46556@debbugs.gnu.org, ynyaaa@gmail.com To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 17 22:28:41 2021 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 1lCUNF-00018R-Mh for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Feb 2021 22:28:41 +0100 Original-Received: from localhost ([::1]:50640 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCUNE-0005GU-Nd for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Feb 2021 16:28:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCTPa-0004nP-1Z for bug-gnu-emacs@gnu.org; Wed, 17 Feb 2021 15:27:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33648) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lCTPZ-0000Dw-Q7 for bug-gnu-emacs@gnu.org; Wed, 17 Feb 2021 15:27:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lCTPZ-0005xx-Kt for bug-gnu-emacs@gnu.org; Wed, 17 Feb 2021 15:27:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Feb 2021 20:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46556 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 46556-submit@debbugs.gnu.org id=B46556.161359359422899 (code B ref 46556); Wed, 17 Feb 2021 20:27:01 +0000 Original-Received: (at 46556) by debbugs.gnu.org; 17 Feb 2021 20:26:34 +0000 Original-Received: from localhost ([127.0.0.1]:45194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lCTP8-0005xH-7c for submit@debbugs.gnu.org; Wed, 17 Feb 2021 15:26:34 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lCTP6-0005x2-MW for 46556@debbugs.gnu.org; Wed, 17 Feb 2021 15:26:33 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54667) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCTP0-0008Tt-9Y; Wed, 17 Feb 2021 15:26:26 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1699 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lCTOz-0006yb-JJ; Wed, 17 Feb 2021 15:26:26 -0500 In-Reply-To: (message from Alan Third on Wed, 17 Feb 2021 20:07:27 +0000) 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" Xref: news.gmane.io gmane.emacs.bugs:200220 Archived-At: > Date: Wed, 17 Feb 2021 20:07:27 +0000 > From: Alan Third > > In fact, I'm just looking over w32term.c and in the function transform > there are two equations: > > pt.x = > x0 + (x - x0) * xform->eM11 + (y - y0) * xform->eM21 + xform->eDx + 0.5f; > pt.y = > y0 + (x - x0) * xform->eM12 + (y - y0) * xform->eM22 + xform->eDy + 0.5f; > > What happens if you remove the +0.5f from them? I'm guessing they're > there to influence the rounding during conversion from a floating > point calculation into an integer? Yes. Removing them produces worse results. Anyway, as I said earlier, I stepped through the code, and all the vertices are computed without any roundoff, exactly as expected. Moreover, the "good" squares, which have no 1-pixel problem, come out of that code with exactly the same values as the "bad" one, modulo the shift in X direction. The members of xform matrix are also exact, either zero or +/-1.