mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Add with_alpha() to shader and shadow element
This commit is contained in:
@@ -245,6 +245,11 @@ impl ShaderRenderElement {
|
|||||||
self.area.loc = location;
|
self.area.loc = location;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn with_alpha(mut self, alpha: f32) -> Self {
|
||||||
|
self.alpha = alpha;
|
||||||
|
self
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Element for ShaderRenderElement {
|
impl Element for ShaderRenderElement {
|
||||||
|
|||||||
@@ -175,6 +175,11 @@ impl ShadowRenderElement {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn with_alpha(mut self, alpha: f32) -> Self {
|
||||||
|
self.inner = self.inner.with_alpha(alpha);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
pub fn has_shader(renderer: &mut impl NiriRenderer) -> bool {
|
pub fn has_shader(renderer: &mut impl NiriRenderer) -> bool {
|
||||||
Shaders::get(renderer)
|
Shaders::get(renderer)
|
||||||
.program(ProgramType::Shadow)
|
.program(ProgramType::Shadow)
|
||||||
|
|||||||
Reference in New Issue
Block a user