On Mon, May 13, 2002 at 02:33:08PM +0000, Mikhael Goikhman wrote:
> On 13 May 2002 12:07:20 +0200, Dominik Vogt wrote:
> > 
> > On Sat, May 11, 2002 at 06:38:25PM +0200, Olivier Chapuis wrote:
> > > On Fri, May 10, 2002 at 12:33:47PM +0200, Dominik Vogt wrote:
> > > > But why make a special case if there is a mini icon?  If we need
> > > > a tint colour, shouldn't it be applicable to any forground, not
> > > > just icons?  I see no reason why, for example, text shouldn't
> > > > benefit from tinting.
> > > 
> > > I do not think that tint should be applied to fg, *Gradient and
> > > even the transparent part of the background of a pixmap (i.e., bg).
> > > At the present time Tint tints the transparent part of the background
> > > the cs pixmap for *Pixmap colorset (as TintMask does not) and now
> > > I think this is not a good idea.
> > > 
> > > The reason is that I do not see the interset to tint a colour,
> > > the user can do that by just changing the color in the Colorset
> > > cmd.
> > 
> > But the user does not know the algorithm in fvwm.  Consider this:
> > You have a button button with text and an icon in FvwmButtons.  It
> > shall visually indicate if the internet connection is up.  One
> > might want to do this by tinting the whole button.  You could
> > simply say
> > 
> >   Colorset 123 tint blue
> > 
> > Very comfortable to use and very flexible.  We might want to
> > distinguish between a foreground and background tint.
> 
> So, it seems, to make everyone happy, we need TintBgImage, TintFgImage and
> TintText instead of the current Tint and TintMask, and proposed IconTint.
> So a user chooses what he wants to tint when internet arives:
> 
>   Colorset 123 TintBgImage blue 40, TintFgImage green 30
> 
> or maybe:
> 
>   Colorset 123 TintText white 15, TintFgImage white 30
> 
> TintBgImage corrects: Image, *Gradient, bg, sh, hi and "fg contrast".
> TingFgImage corrects: AlphaImage and (menu/mini) icons.
> TintText corrects: fg and fgsh.
> 
> Does this make sense for you, Olivier?
>

I added the Tint option, because XRender give it for free: just create
a depth 24 1x1 pixmap of the given color and a depth 8 1x1 pixmap with
an alpha which correspond to the percentage and use XRenderComposite to
tint the original pixmap. So my idea was to use this magic function
to build an infinite number of pixmap from one and to tint (mini-)icons
to get some "interactive" effects. Now you and Dominik ask to tint
a color ... I am not against this and I am agree that this can be
useful for the users, but then I think that we should do the computation
by hands (of course we can use XRenderComposite for the computation).
So my question is given a color (r,g,b), a color  for tinting
(tr,tg,tb) and a percentage p how we compute the tinted colors
(x,y,z)? I think I can find the formula but if one have it this can
save me some (or maybe a lot of) times. Moreover, this will allows to
reimplement XRenderComposite and provied XRender support for those
which do not have it. However, I cannot warranty any success for
these (in particular this may be dramatically slow).

For the syntax it seems that we need:

BgTint: *Gradient, bg, sh, hi
FgTint: fg, fgsh
PixmapTint: Pixmap (transparent part not tinted)
AlphaPixmapTint: for the future AlphaPixmap
IconTint: for (mini-)icon

but again I am a bit reticent for BgTint and FgTint.

Olivier
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to