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#40845: SVG rendering issues Date: Sat, 22 Aug 2020 19:54:48 +0300 Message-ID: <835z9aaaef.fsf@gnu.org> References: <20200425174651.GC82687@breton.holly.idiocy.org> <20200426211741.GA93046@breton.holly.idiocy.org> <09a19c49-91cb-8024-8c34-53d846d98313@gmail.com> <20200503141348.GA4071@breton.holly.idiocy.org> <83r1w1ovc3.fsf@gnu.org> <20200509142727.GA42881@breton.holly.idiocy.org> <20200509195415.GA44624@breton.holly.idiocy.org> <835zcx314r.fsf@gnu.org> <20200515214047.GB55337@breton.holly.idiocy.org> <20200822161510.GB89421@breton.holly.idiocy.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16245"; mail-complaints-to="usenet@ciao.gmane.io" Cc: cpitclaudel@gmail.com, 40845@debbugs.gnu.org, pipcet@gmail.com To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 22 18:56:12 2020 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 1k9WoN-00047C-Fj for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 Aug 2020 18:56:11 +0200 Original-Received: from localhost ([::1]:52416 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k9WoM-0004QQ-Hg for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 Aug 2020 12:56:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k9WoE-0004O5-PF for bug-gnu-emacs@gnu.org; Sat, 22 Aug 2020 12:56:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39735) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k9WoE-0007fs-Gj for bug-gnu-emacs@gnu.org; Sat, 22 Aug 2020 12:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k9WoE-000453-FP for bug-gnu-emacs@gnu.org; Sat, 22 Aug 2020 12:56: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: Sat, 22 Aug 2020 16:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40845 X-GNU-PR-Package: emacs Original-Received: via spool by 40845-submit@debbugs.gnu.org id=B40845.159811530615617 (code B ref 40845); Sat, 22 Aug 2020 16:56:02 +0000 Original-Received: (at 40845) by debbugs.gnu.org; 22 Aug 2020 16:55:06 +0000 Original-Received: from localhost ([127.0.0.1]:51281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9WnK-00043n-DX for submit@debbugs.gnu.org; Sat, 22 Aug 2020 12:55:06 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9WnH-00042z-RF for 40845@debbugs.gnu.org; Sat, 22 Aug 2020 12:55:04 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40358) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k9WnB-0007OZ-GD; Sat, 22 Aug 2020 12:54:57 -0400 Original-Received: from [176.228.60.248] (port=4936 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1k9WnA-0004EH-Uw; Sat, 22 Aug 2020 12:54:57 -0400 In-Reply-To: <20200822161510.GB89421@breton.holly.idiocy.org> (message from Alan Third on Sat, 22 Aug 2020 18:15:15 +0200 (CEST)) 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:185976 Archived-At: > Date: Sat, 22 Aug 2020 18:15:15 +0200 (CEST) > From: Alan Third > > I still don't know how to use the mouse face. I couldn't see any way > to detect if it's in use when we first load the image in xdisp.c. Can you please remind me what was the problem? The bug discussion is very long, and I didn't have time/patience to find the mouse face bits. > -ptrdiff_t lookup_image (struct frame *, Lisp_Object); > +ptrdiff_t lookup_image (struct frame *, Lisp_Object, int face_id); ^^^^^^^^^^^ Please don't use names in prototypes, only types. > + /* Parse the unmodified SVG data so we can get it's initial size. */ ^^^^ "its" > + /* The parsing is complete, rsvg_handle is ready to used, close it ^^^^^^^^^^^^^^^^ "is ready to be used" > + background color, before including the original image. This ^^ Two spaces between sentences, please. > + Lisp_Object encoded_contents = Fbase64_encode_string > + (make_unibyte_string (contents, size), Qt); Our style of breaking long lines like this one is different: Lisp_Object encoded_contents = Fbase64_encode_string (make_unibyte_string (contents, size), Qt); > + if (!NILP (value)) > + { > + foreground = image_alloc_image_color (f, img, value, img->face_foreground); > + } No need for braces when the block has only one line. Thanks.