From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65042: 30.0.50; alpha-background doesn't effect background of stipple in emacs 30.0.50 pgtk Date: Fri, 04 Aug 2023 08:37:31 +0800 Message-ID: <87y1irabhw.fsf@yahoo.com> References: <875y5wf6ti.fsf@web.de> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31212"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 65042@debbugs.gnu.org To: Felix Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 04 02:38:26 2023 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 1qRipm-0007zS-L7 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Aug 2023 02:38:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qRipQ-0006RN-Td; Thu, 03 Aug 2023 20:38:04 -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 1qRipP-0006RC-PK for bug-gnu-emacs@gnu.org; Thu, 03 Aug 2023 20:38:03 -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 1qRipO-0004vm-GA for bug-gnu-emacs@gnu.org; Thu, 03 Aug 2023 20:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qRipO-0006md-4j for bug-gnu-emacs@gnu.org; Thu, 03 Aug 2023 20:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2023 00:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65042 X-GNU-PR-Package: emacs Original-Received: via spool by 65042-submit@debbugs.gnu.org id=B65042.169110947026055 (code B ref 65042); Fri, 04 Aug 2023 00:38:02 +0000 Original-Received: (at 65042) by debbugs.gnu.org; 4 Aug 2023 00:37:50 +0000 Original-Received: from localhost ([127.0.0.1]:53113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRipB-0006mB-Nm for submit@debbugs.gnu.org; Thu, 03 Aug 2023 20:37:50 -0400 Original-Received: from sonic308-10.consmr.mail.ne1.yahoo.com ([66.163.187.33]:39665) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRip9-0006lw-IV for 65042@debbugs.gnu.org; Thu, 03 Aug 2023 20:37:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691109461; bh=KKM2xh5MFSvJgkFkJbgbH95U4aswXx5H3l3GFDOVhlA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=HSDt5PviBqdFmsuo27i6DA7YbJ7cH7NIgETKnPX0wduIDN73Q26/TJIpEYphkZUPyyYCsXCds9GKFOwcR1wSHRGNW5zjFoY7yMpg+TfP5DiRJlQuA8nC67BK2ov8pMqNv5IBDOZpPKiUkmWLsoZMtEK02DE8JMc22UT08URejznvy8nw83YSewZsGwb3kWAGyErg3qSZx131ua4UjJj2FH5Rmv7TxVNncEapp32Fl4+V06YKSPqOeLNycSR3wC97Wmn69DjVXyYYFlCQaTfASwoaWIKuM04pOUERlh1ZSw3nxNPdp2/ggde5moFgoReZ/3v2R70wOVd/Bq2OaGRiDA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691109461; bh=z/Afmif5FqGUjfW/9bG915JMXnkSyjvkiEwcoZDIITN=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=FS+LIkCa9bJ32qHZ6IWHUeCyCnu4NQBTymf7r4qxS5OALUh9n0xPppWuHAYkqx2L36cVLBAA75fK4tH0Lkv6lLmQFA5Xx6d+rnQack8H/7U+Eg16gro+FAn8kgn/EUewmOdg3dGij6XAeDJw6JRPXFADBv4UxyASLpnGThjFz1hFjNHm8/aYk6eZAj3oD9UPFh3mV0DVYN3I2T+X8dv1BlqGxu5+AB+zBc5AVEd90Y2V/undNUW4u/IMu2tF/gVoO9f9wwAZHdLu0ymQLDuwphh4hrMojXw4vCfn1G05ZlDEAJ2+3MMZrbDQzAPNYEQ2x3+W92hbd1INJ1lwuAPjAQ== X-YMail-OSG: eCE6q7kVM1kDvHJiPy5pF2.6rkEz7Q4oRutNXUxOnF4RSS57EymwxRD1BWyCtN_ NPXD4i1rGPF.0HfmwxORujikSkp4WET7W6AVN4Is7ymsSk_ApWc7zpxanIjxevByh3wjSlqf_Kwm KbDjtgZRMv7QIF.SpyqPmX0jIZRsdGzngd1wF5WtTRkMHWPpftAtZi_yTL1iJvfw3BgLzqIk5462 vRm1wHBhZdAPB4cebUt5N2reQ2EKJHq5Yo21AEQ_KSovQv52cnISjZnLYGkosCKuZ2kDRc.z.bzl xywKxv44XIX4oPfyuB6yrQbCdmPB0zdJg36zgyWvV_d67UNO06ntR4JjrO5Odijq2HM_TsMZ4UCv RDSKw6QMl2C5JKmm4J8vy.Ov7W5Nn7PDsO7wVZO46.z63wbWjTYpMzvi49tysy0bq_bEDO6b5ZGM xpWMl7tVXaeBha5yyxKQjVO4eSPcZuEt68sW16aNeCTM7y4T7_O7tNzjMGmK2VK9LUS8AFkkkYwX Dfs2Wey4n5ET3GGyZVKbEl_dqDM.QrzZ96lg9mKfYnwiPTWp8g6aUpu07N63H9zas9Ryr3a97ai1 NMd8GG2qr6FP4Sm9z87SrVgmH2Qmx87ki3i62e2L0nE7GwoYAtkBphWXqm_y1hzE_JEmDShYjBVN u58OW9UjwbnKZXUG5_n5v54xiDIhVCZxy13Uaq3ZFDPy1F.U0QqRbI.2L0z6uhw4BNQ5z5gV_inT 5WQNaQMS3bNvK0JWLkm9XBnYiaqlLcQgK6ixGVV_i_qZSdGaPiM0Rmk5O2OhXmZDJHL4ysbjobJZ FdkRiOjTZ.igA8FHQSCptUfri6fiU2EdDEkFWC_oYa X-Sonic-MF: X-Sonic-ID: b5855b9b-9f6a-4c55-81a4-31edd5260aee Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ne1.yahoo.com with HTTP; Fri, 4 Aug 2023 00:37:41 +0000 Original-Received: by hermes--production-sg3-6b8fc8d58f-zt9l9 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 993c67dcbad3621a3cb317d5b6caee5f; Fri, 04 Aug 2023 00:37:35 +0000 (UTC) In-Reply-To: <875y5wf6ti.fsf@web.de> (Felix's message of "Thu, 03 Aug 2023 18:07:21 +0200") X-Mailer: WebService/1.1.21685 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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:266632 Archived-At: Felix writes: > The background of stipple stays opaque with alpha-background parameter > set for transparency. > This came up in the use of the new package 'indent-bars'. > The github issue: https://github.com/jdtsmith/indent-bars/issues/8 > I tested this with 'emacs -Q' only enabling the needed packages (compat > and indent-bars). Thanks. Do stipples start displaying adequately with this change? diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 9c1fc7bef4e..bc5c6209d42 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -1328,14 +1328,16 @@ fill_background_by_face (struct frame *f, struct face *face, int x, int y, int width, int height) { cairo_t *cr = pgtk_begin_cr_clip (f); + double r, g, b, a; cairo_rectangle (cr, x, y, width, height); cairo_clip (cr); - double r = ((face->background >> 16) & 0xff) / 255.0; - double g = ((face->background >> 8) & 0xff) / 255.0; - double b = ((face->background >> 0) & 0xff) / 255.0; - cairo_set_source_rgb (cr, r, g, b); + r = ((face->background >> 16) & 0xff) / 255.0; + g = ((face->background >> 8) & 0xff) / 255.0; + b = ((face->background >> 0) & 0xff) / 255.0; + a = f->alpha_background; + cairo_set_source_rgba (cr, r, g, b, a); cairo_paint (cr); if (face->stipple != 0) @@ -1343,10 +1345,10 @@ fill_background_by_face (struct frame *f, struct face *face, int x, int y, cairo_pattern_t *mask = FRAME_DISPLAY_INFO (f)->bitmaps[face->stipple - 1].pattern; - double r = ((face->foreground >> 16) & 0xff) / 255.0; - double g = ((face->foreground >> 8) & 0xff) / 255.0; - double b = ((face->foreground >> 0) & 0xff) / 255.0; - cairo_set_source_rgb (cr, r, g, b); + r = ((face->foreground >> 16) & 0xff) / 255.0; + g = ((face->foreground >> 8) & 0xff) / 255.0; + b = ((face->foreground >> 0) & 0xff) / 255.0; + cairo_set_source_rgba (cr, r, g, b, a); cairo_mask (cr, mask); }