From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Face transparency attribute Date: Thu, 18 Jan 2024 15:14:21 +0800 Message-ID: <875xzrw1te.fsf@yahoo.com> References: <87sf2v8lu4.fsf@nixos.mail-host-address-is-not-set> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12065"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Sebastian =?utf-8?Q?W=C3=A5linder?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 18 08:15:20 2024 Return-path: Envelope-to: ged-emacs-devel@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 1rQMcR-0002sE-Mr for ged-emacs-devel@m.gmane-mx.org; Thu, 18 Jan 2024 08:15:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQMbo-0000g1-Ef; Thu, 18 Jan 2024 02:14:40 -0500 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 1rQMbm-0000f3-6P for emacs-devel@gnu.org; Thu, 18 Jan 2024 02:14:38 -0500 Original-Received: from sonic314-22.consmr.mail.ne1.yahoo.com ([66.163.189.148]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQMbj-0005rC-7o for emacs-devel@gnu.org; Thu, 18 Jan 2024 02:14:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1705562071; bh=rZh6oJ5Dp08nk0BzGrXY0o2cd5ut7lvhAD8RK2/53uE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=WzW77KlnOyWQmMgZNjNON9vWRTtZ0rCGSDcBSZaxby/giHnGS/6skSfIxG7knJgbFkZl6xoBdyq18TILngsRO7JEb6VeJe4LbPPVxXhMmoK1QIP+LVzk4rSXJz9J2IcyJ3y3GgNZUn4WXVQnnsqM8TF5oVdubRq33qZDd+qasQQ8zw9O2RCTxtcASWTqlDnFs+7y5n+biUM/JvBmryG63Nyg+speyy987JBebRKBhcWCR9sz4zA3PwBdsm6HF0ma+jA7FObiS0qOfHhNmpV+CmcHvOcexSPl+7xmdpkdpCXQAX+MrRmseflxWebXbUab77xUegvwQ1S6deVgH/VlEw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1705562071; bh=pd7l1T5pubQVtwu+0V3TL+WTpg/IcziD7bRsT8F/KWO=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=HKWFye0U9WtAK7RGCE8o9Mwc9uXkMSHusewER5Z2w+T+RnpTgduJUDzZyq111v9RkgE8PcC7p+SWS/SLoPev76WwiSCKB4isP3JxlNQ2PNDuCP70lHuGR1VNNgPkYOxHsqj2lxppLwqG3TY1FREfQmW2kShkHk6ovaEKcosG768gF2/vgnjoXW2Kx89bk6u0J4XQF1P31a5Me9e+0i9B2aQMFGCdoshd99c0vJ6ahgI/JY8weZfsaMFONLL4VsHOhL8KzLP7BszMgj5kwSWItbnyu8AOn0Qi43HGQjuquIJk3LqkfKuYZ5Q8vNHENIra9R/leipCdT4Sd4AfA/ykIw== X-YMail-OSG: 7SmfGSsVM1mklXrVjy5OHTtWJsXWx2036Ld0KkxQrP9eYRxyRTWBP85oI2Ow6H7 Z6Hi.a4Z7XPtghPgB_zn9thZlSazs1.lwFLEHf658FAQZVLAzwVn7vlKnVPSlXgU5mvb1TvMvKSy 4p_ZZWissmMhyd17JTGwSRkAqTz4AI7rMVUxBe96yKOIDA6ZCivpzDx5FeeXxNPWGNhGWoiPYtF4 LGlzoS_SUMrxNgRTncFJTpkgtXDBXQKxyprbuy_SWIaH9UONEf8wXkrRpbC5CA9RPrRK9Ar6rE00 g_IRgKH7ongwxPCzvDklLMPDWVOWxS2BYQopVh1mFiVatSx.1qF38BcQp3IpO6mCM6KDOIlT7VYx kwyh_gde8XSn9YNb9JACGd.xqPsf6U265egxHqc7Mb2xYTh9uv_CPkXLD4.vEPGI_q_lOOe9fhjL PAjwXrrkOBtPbNi6IhKSeWpUjKitkg8klrSX8_SYLXpT9ipDJU6aRRenYgw7MwG8LgjWxp_Js_Re cLmRcQMEQNHvkyQ.8mf21hDtCOQ3m.8qCN7.tYZlDER1iV8P_PUIPghw4N9HVuehCyqKZ39RTLiE Hd5jCRzhYBGODlPqZXPZBRxNoEjJlCWAq3mv2VhEG80gR99Hd1ezVd5SF_gRMe19.aAlaNzmMFWx oueMxwTd0g_9nhGPwhDAsMlXDe8niJ3.ycVgKxJ18H7LC7_9p6G3Tl_Mu11FDDAvbE1iekQF4xID IIvODVmF.bbeEIUhPtM8IjR7bvr1gRnij0LuxWnlberJcq1THSjRGlKt9ia8GOsP6Ez9U9eFkKSZ BMS_OWqGuU0aV0TtK0Q7bRuO6ipomkK1G21Vd2rYao X-Sonic-MF: X-Sonic-ID: afc46567-2636-4665-913a-b115fc850be4 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ne1.yahoo.com with HTTP; Thu, 18 Jan 2024 07:14:31 +0000 Original-Received: by hermes--production-sg3-677476f564-sszg9 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID f63fc90faa4f0bbaf848286bd8dead7d; Thu, 18 Jan 2024 07:14:26 +0000 (UTC) In-Reply-To: <87sf2v8lu4.fsf@nixos.mail-host-address-is-not-set> ("Sebastian =?utf-8?Q?W=C3=A5linder=22's?= message of "Thu, 18 Jan 2024 02:35:47 +0100") X-Mailer: WebService/1.1.22010 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.189.148; envelope-from=luangruo@yahoo.com; helo=sonic314-22.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:315077 Archived-At: Sebastian W=C3=A5linder writes: > Frames in Emacs recently got the option to set a transparency that > makes all background colors in the frame transparent to the degree you > set. > > Is there any way to set the transparency on a particular face? I > didn't find any way when looking through the documentation. There are as yet no provisions for configuring individual faces to display at their own transparency levels. > If not, are there any workarounds and would face local transparency be > hard to implement? It would not be prohibitively difficult, although most of our code assumes that face colors are always opaque, which suggests two approaches to implementing per-face transparency values: either to extend face colors with an extra alpha channel, or to extend faces with a new attribute specifying a transparency value. The first would pose difficulties in the way of adapting the window-system code charged with manipulating colors without regard to the existence of an alpha channel, whereas the second would open a semantic can of worms, raising questions such as how the new face attribute should be disposed as two faces are merged. Right now, most such window-system code is jerry-rigged to introduce the alpha channel at the stage where glyph backgrounds are drawn, and before the few routines so affected colors are treated much as they have always been. Neither approach is easy or exceptionally challenging, so interested individuals are invited to chose whichever they should find more to their liking. > I'd like to experiment with transparency, making the fringes for > instance more transparent, as it's not a content area. The relevant code is in xterm.c and pgtkterm.c (*_draw_fringe_bitmap), and godspeed.