From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.devel Subject: Re: new image-type: composite, or not Date: Thu, 31 Jan 2013 08:06:27 +0100 Message-ID: <874nhxrfv0.fsf@fh-trier.de> References: <87y5ffsvg3.fsf@fh-trier.de> <87pq0m4h6e.fsf@fh-trier.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1359616012 5636 80.91.229.3 (31 Jan 2013 07:06:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Jan 2013 07:06:52 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 31 08:07:12 2013 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 1U0oEq-0001kW-8k for ged-emacs-devel@m.gmane.org; Thu, 31 Jan 2013 08:07:12 +0100 Original-Received: from localhost ([::1]:60619 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0oEY-0007YX-5G for ged-emacs-devel@m.gmane.org; Thu, 31 Jan 2013 02:06:54 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0oET-0007YE-A3 for emacs-devel@gnu.org; Thu, 31 Jan 2013 02:06:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0oEP-0004Ms-SZ for emacs-devel@gnu.org; Thu, 31 Jan 2013 02:06:49 -0500 Original-Received: from gateway-b.fh-trier.de ([143.93.54.182]:55097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0oEP-0004K2-GY for emacs-devel@gnu.org; Thu, 31 Jan 2013 02:06:45 -0500 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier] Original-Received: from luca (dslb-088-068-040-155.pools.arcor-ip.net [88.68.40.155]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-b.fh-trier.de (Postfix) with ESMTPSA id 6ECDF17B468; Thu, 31 Jan 2013 08:06:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=fh-trier.de; s=default; t=1359615988; bh=iMuvvuE3C8rwntM7I1oVK9eOUdQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; b=ar5X4JNnSpVPyHruPSgs6J6D4pJtjYzCL4kLbXF5f1SmWq8GE+vtTYAo4/aCEqUR6 5H556acD6jQLm/CLIY0oivafZFxSoYeeZdOrb+yBW2+GwM495CTW80bOuqTwrP+lGm 51HbSe+1R5wepNhSbNpBW39CadglBA64db3kLdSI= Original-Received: from localhost ([127.0.0.1] helo=luca) by luca with esmtp (Exim 4.72) (envelope-from ) id 1U0oE7-0004m4-Ro; Thu, 31 Jan 2013 08:06:27 +0100 In-Reply-To: (Stefan Monnier's message of "Wed, 30 Jan 2013 19:21:35 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 143.93.54.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:156722 Archived-At: Stefan Monnier writes: >> http://public.fh-trier.de/~politza/emacs/pdf-isearch.png >> Because of anti-aliasing, the background is not merely a single color, > Ah, so your composite has the PDF on top and the highlighting below? > That means you need to know the background color of the PDF document. > I though you'd be put the highlighting above, but then it tends to > obscure the text it highlights, unless you use something like > =CE=B1-blending. Yes, and at one point I did. Here is how this is drawn, from top to bottom Z-order. masked Pdf slice colored background slice complete Pdf >>>> (mark-image foreground background &rest edges-list) > Right, but I'm not sure what foreground and background mean (if you > assume the document is back-on-white, I can guess what you might want > to say, but if the document is a colorful image it's much less clear). Yes, at least some notion of foreground and background colors. > Also, it would require an `image' argument, other it wouldn't know which > image to mark. And it would need to store the mark-data somehow > somewhere (probably within the `image' descriptor), so that redisplay > knows to put the mark next time it refreshes the display. > >> I don't know. I just thought, that maybe this kind of low-level >> tinkering with images, masks and slices is not really needed and maybe >> it does not really fit nicely in the current image-framework. If that >> is true, then some more high-level function could simplify an >> implementation or make it cleaner. > > That would be nice indeed, but I'm not sure if mark-image would let us > avoid such low-level tinkering. > This function was just thrown in as an (not very well thought out) afterthought. The question in my mind was, whether some (the majoriy,regular,me,...) Emacs user wants to compose images in fancy ways, or if it suffices for him beeing able to say: ,,Highlight this and that part of the image in this or that (high-level) way.''. >>> Not sure what other candidates there can be, neither for mark-image nor >>> for a composite image. >> Well, customizing tree-widgets images... > > You're thinking of using composite images in the tree-widget icons? I was just running out of ideas... But with my current implementation, it would be possible to change some colors on the fly in any image used by any package. Andreas