emacs-devel
[Top][All Lists]
Advanced

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

Re: Face transparency attribute


From: Po Lu
Subject: Re: Face transparency attribute
Date: Thu, 18 Jan 2024 15:14:21 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Sebastian Wålinder <s.walinder@gmail.com> 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.


reply via email to

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