decal 0.6.0

Declarative DSL for describing scenes and rendering them to SVG or PNG
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::Drawable;
use crate::primitives::BlendMode;

/// Capability for configuring blending mode on a node.
pub trait Blendable: Drawable {
    /// Sets the blend mode used when compositing the node with underlying
    /// content.
    ///
    /// # Arguments
    /// - `value`: The [`BlendMode`] applied during rendering.
    ///
    /// # Returns
    /// - [`Self`]
    fn blend_mode(mut self, value: BlendMode) -> Self {
        self.visual_mut().blend_mode = value;
        self
    }
}