From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.bugs Subject: bug#36315: 27.0.50; SVG transparency handling is inaccurate Date: Wed, 26 Jun 2019 08:48:25 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <83blymnaog.fsf@gnu.org> <83imstli5f.fsf@gnu.org> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="256439"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Cc: 36315@debbugs.gnu.org, pipcet@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 26 01:49:27 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfvBm-0014Yh-TL for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Jun 2019 01:49:27 +0200 Original-Received: from localhost ([::1]:35856 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfvBl-00015E-TT for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Jun 2019 19:49:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34804) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfvBd-00014n-BR for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2019 19:49:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hfvBV-0005zT-AB for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2019 19:49:12 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48581) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hfvBO-0005p0-Cj for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2019 19:49:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hfvBO-0003w3-7w for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2019 19:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: YAMAMOTO Mitsuharu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Jun 2019 23:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36315 X-GNU-PR-Package: emacs Original-Received: via spool by 36315-submit@debbugs.gnu.org id=B36315.156150650815077 (code B ref 36315); Tue, 25 Jun 2019 23:49:02 +0000 Original-Received: (at 36315) by debbugs.gnu.org; 25 Jun 2019 23:48:28 +0000 Original-Received: from localhost ([127.0.0.1]:33892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfvAq-0003v7-88 for submit@debbugs.gnu.org; Tue, 25 Jun 2019 19:48:28 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:52458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfvAo-0003uu-2r for 36315@debbugs.gnu.org; Tue, 25 Jun 2019 19:48:27 -0400 Original-Received: from mathent.math.s.chiba-u.ac.jp (mathent [192.168.32.5]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 6AD88F08E4; Wed, 26 Jun 2019 08:48:25 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) In-Reply-To: <83imstli5f.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:161449 Archived-At: On Wed, 26 Jun 2019 01:54:52 +0900, Eli Zaretskii wrote: > > > Date: Tue, 25 Jun 2019 08:06:23 +0900 > > From: YAMAMOTO Mitsuharu > > Cc: pipcet@gmail.com, > > 36315@debbugs.gnu.org > > > > > The patch looks quite large. Do we gain anything significant, apart > > > of the appraisal of librsvg developers? > > > > 1. The current librsvg generates gdk-pixbuf via cairo image surface. > > So we can avoid unnecessarily intermediate data structure and > > roundtrip of alpha-component processing using cairo directly. > > 2. If configured --with-cairo, we can do further shortcut. This is > > included in the patch attached to this mail. Pip's patch is also > > reflected. > > 3. Image transformations can be applied when rendering to the cairo > > surface, not after generating bitmaps. So we can take advantage of > > outline format and get better results of scaling. This is not in > > the patch. Probably it should be done by a separate commit after > > general image transformation code has been stabilized. > > Maybe it's just me, but I'm uneasy to bypass librsvg and call Cairo > directly for manipulating SVG images. Why doesn't librsvg provide a > way to do this via its own APIs? > > Does anyone else think it's unusual to make such direct calls to what > is essentially a lower-level library? What kind of operations do you think librsvg should provide us with, instead of letting us use cairo? BTW, GTK 4 is deemphasizing GdkPixbuf: https://developer.gnome.org/gtk4/stable/ch29s02.html#id-1.6.4.4.33 I don't think GdkPixbuf is dropped from GTK/GDK soon, but we don't have any particular reasons to stick to it for rendering SVG images. > > > I've built the patch on Windows (you forgot cairo_surface_destroy, so > > > I needed to add it), but the result is strange, or maybe I don't > > > understand what is expected. I don't see any rectangle of color > > > #f00000, I see the entire frame with black background, and a few > > > characters in other colors. > > > > When I tested Pip's test case, I started with emacs -Q -rv to avoid > > text becomes invisible. I could see a red rectangle on X11. Do you > > see such a rectangle without my patch? > > Yes, I see an orange rectangle (a square, actually, I think). If the square is not displayed with my patch, then there is a bug in it. I've sent 3 versions and the first one was wrong. Please try again with the latest one in my previous mail: https://debbugs.gnu.org/cgi/bugreport.cgi?att=1;msg=26;bug=36315;filename=svg-cairo.diff YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp