emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new image-type: composite, or not


From: Andreas Politz
Subject: Re: new image-type: composite, or not
Date: Thu, 31 Jan 2013 08:06:27 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Stefan Monnier <address@hidden> 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
> α-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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]