You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My hardware is compatible and my graphics drivers are up-to-date.
What happened?
When rendering text using the tiny_skia renderer, the alpha channel is not respected.
When the text is rasterized and cached, it ignores the alpha component (which is quite reasonable, as it makes it so that if the alpha component changes slightly it does not have to be re-rasterized), but the alpha component is not added back later.
This is because the default blending:
Note: I haven't checked whether the individual glyph's option color (glyph.color_opt from run.glyphs) has an alpha value and should multiply with the original alpha.
What is the expected behavior?
The text should be rendered with transparency.
Version
master
Operating System
Linux
Do you have any log output?
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Is this issue related to iced?
What happened?
When rendering text using the
tiny_skia
renderer, the alpha channel is not respected.When the text is rasterized and cached, it ignores the alpha component (which is quite reasonable, as it makes it so that if the alpha component changes slightly it does not have to be re-rasterized), but the alpha component is not added back later.
This is because the default blending:
iced/tiny_skia/src/text.rs
Line 249 in c635290
Has a full 100% transparency.
The fix is simple enough, as the color is already available at:
iced/tiny_skia/src/text.rs
Line 199 in c635290
Which could then be substituted into the blending with a:
(the blend mode might have to be changed as well)
Note: I haven't checked whether the individual glyph's option color (
glyph.color_opt
fromrun.glyphs
) has an alpha value and should multiply with the original alpha.What is the expected behavior?
The text should be rendered with transparency.
Version
master
Operating System
Linux
Do you have any log output?
No response
The text was updated successfully, but these errors were encountered: