From b6202b646a0d5ecced301d9bac8bfcaf977d7ee4 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 15 Dec 2022 22:51:55 +0100 Subject: Reflection for castables --- library/src/visualize/shape.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'library/src/visualize/shape.rs') diff --git a/library/src/visualize/shape.rs b/library/src/visualize/shape.rs index 702fc6f8..a3443189 100644 --- a/library/src/visualize/shape.rs +++ b/library/src/visualize/shape.rs @@ -3,6 +3,8 @@ use std::f64::consts::SQRT_2; use crate::prelude::*; /// A sizable and fillable shape with optional content. +/// +/// Tags: visualize. #[func] #[capable(Layout, Inline)] #[derive(Debug, Hash)] @@ -25,7 +27,7 @@ impl ShapeNode { /// How to fill the shape. pub const FILL: Option = None; /// How to stroke the shape. - #[property(skip, resolve, fold)] + #[property(reflect, skip, resolve, fold)] pub const STROKE: Smart>> = Smart::Auto; /// How much to pad the shape's content. @@ -36,7 +38,7 @@ impl ShapeNode { pub const OUTSET: Sides>> = Sides::splat(Rel::zero()); /// How much to round the shape's corners. - #[property(skip, resolve, fold)] + #[property(reflect, skip, resolve, fold)] pub const RADIUS: Corners>> = Corners::splat(Rel::zero()); fn construct(_: &Vm, args: &mut Args) -> SourceResult { -- cgit v1.2.3