//! Colorable geometrical shapes. use std::f64::consts::SQRT_2; use super::prelude::*; use super::TextNode; /// Place a node into a sizable and fillable shape. #[derive(Debug, Hash)] pub struct ShapeNode(pub Option); #[class] impl ShapeNode { /// How to fill the shape. pub const FILL: Option = None; /// How the stroke the shape. pub const STROKE: Smart> = Smart::Auto; /// The stroke's thickness. pub const THICKNESS: Length = Length::pt(1.0); /// How much to pad the shape's content. pub const PADDING: Linear = Linear::zero(); fn construct(_: &mut Vm, args: &mut Args) -> TypResult