From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: alpha support for colors Date: Tue, 30 Oct 2012 09:28:40 -0400 Message-ID: References: <87wqy8n2tk.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1351603740 14751 80.91.229.3 (30 Oct 2012 13:29:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Oct 2012 13:29:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: aaditya sood Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 30 14:29:09 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TTBsO-0003Gx-B3 for ged-emacs-devel@m.gmane.org; Tue, 30 Oct 2012 14:29:04 +0100 Original-Received: from localhost ([::1]:51158 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTBsF-0006WJ-Kr for ged-emacs-devel@m.gmane.org; Tue, 30 Oct 2012 09:28:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTBs7-0006Vv-UI for emacs-devel@gnu.org; Tue, 30 Oct 2012 09:28:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTBs1-0001Mt-Qc for emacs-devel@gnu.org; Tue, 30 Oct 2012 09:28:47 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:58739) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTBs1-0001Mn-MP for emacs-devel@gnu.org; Tue, 30 Oct 2012 09:28:41 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu0/O+LET/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLNBIUGA0kiBwFugmQRAOjM4FYgwU X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="203141298" Original-Received: from 206-248-177-19.dsl.teksavvy.com (HELO pastel.home) ([206.248.177.19]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 Oct 2012 09:28:40 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 3981859419; Tue, 30 Oct 2012 09:28:40 -0400 (EDT) In-Reply-To: (aaditya sood's message of "Tue, 30 Oct 2012 07:37:07 +0000 (UTC)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:154587 Archived-At: > I think a good use case is things like flymake error faces. I want my > error lines to be more "reddish" while still retaining the original > font lock highlighting. I was sold on your idea long before you suggested it (actually, I've been wishing for it mostly to automatically create "lighter/darker" faces and I'm not completely sure if alpha-blending can do that well). I think to do it you'll want to look at the face merging code in src/xfaces.c. There's already code to merge heights (where faces can specify relative sizes or even an Elisp function that computes the new height from the height of underlying faces), so it really shouldn't be that hard. There's a secondary alpha-blending issue, which I think is orthogonal, which is how to blend foreground and background. This part would not be handled in src/xfaces.c. And then again there's the alpha-blending of the Emacs window with the windows that might appear underneath, but this is yet another orthogonal issue. Stefan