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
use super::Drawable;
use crate::primitives::Position;

/// Capability for configuring the positioning of a node.
pub trait Positioned: Drawable {
    /// Sets the positioning mode.
    ///
    /// # Arguments
    /// - `value`: The [`Position`] to apply.
    ///
    /// # Returns
    /// - [`Self`]
    fn position(mut self, value: Position) -> Self {
        self.layout_mut().position = value.into();
        self
    }
}