~eliasnaur/gio

2 2

Rendering Label/text with transparent/clear background?

Details
Message ID
<CAHQ-fMZqdopKUjaMYoPvqpc2HFViYoRuXwppf1_JyYgN5paKTQ@mail.gmail.com>
DKIM signature
pass
Download raw message
Hi is it possible to render a text/label with transparent background?
It seems to me the options are not there since the colors in
"material.Palette" are all color.NRGBA. Also in material.LabelStyle,
there is no way to specify a background color. Would love to know if
this is possible to do. And if not, what is the reason behind this or
if this is just simply due to API is not added there.

Thanks.
Zhao
Details
Message ID
<CB3GQJGACZRS.TZTL5Y2KWBIR@testmac>
In-Reply-To
<CAHQ-fMZqdopKUjaMYoPvqpc2HFViYoRuXwppf1_JyYgN5paKTQ@mail.gmail.com> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
On Sun May 2, 2021 at 22:32 CEST, Zhao Wang wrote:
> Hi is it possible to render a text/label with transparent background?
> It seems to me the options are not there since the colors in
> "material.Palette" are all color.NRGBA. Also in material.LabelStyle,
> there is no way to specify a background color. Would love to know if
> this is possible to do. And if not, what is the reason behind this or
> if this is just simply due to API is not added there.
>

Do you mean a transparent background when using gpu/headless? If so,
I've changed[0] the headless background to transparent.

Elias

[0] gioui.org/commit/8bc1d6bf
Details
Message ID
<CAHQ-fMaeey=ZqQ_4N7MYO=oRaVNUG58h=fPbbx=Foi7dRHU-rQ@mail.gmail.com>
In-Reply-To
<CB3GQJGACZRS.TZTL5Y2KWBIR@testmac> (view parent)
DKIM signature
pass
Download raw message
On Mon, May 3, 2021 at 1:21 AM Elias Naur <mail@eliasnaur.com> wrote:
>
> On Sun May 2, 2021 at 22:32 CEST, Zhao Wang wrote:
> > Hi is it possible to render a text/label with transparent background?
> > It seems to me the options are not there since the colors in
> > "material.Palette" are all color.NRGBA. Also in material.LabelStyle,
> > there is no way to specify a background color. Would love to know if
> > this is possible to do. And if not, what is the reason behind this or
> > if this is just simply due to API is not added there.
> >
>
> Do you mean a transparent background when using gpu/headless? If so,
> I've changed[0] the headless background to transparent.
Yes, thank you! This is what I need.

>
> Elias
>
> [0] gioui.org/commit/8bc1d6bf
Reply to thread Export thread (mbox)