summaryrefslogtreecommitdiff
path: root/library/src/visualize/shape.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-12-15 22:51:55 +0100
committerLaurenz <laurmaedje@gmail.com>2022-12-15 23:11:20 +0100
commitb6202b646a0d5ecced301d9bac8bfcaf977d7ee4 (patch)
tree7d42cb50f9e66153e7e8b2217009684e25f54f42 /library/src/visualize/shape.rs
parentf3980c704544a464f9729cc8bc9f97d3a7454769 (diff)
Reflection for castables
Diffstat (limited to 'library/src/visualize/shape.rs')
-rw-r--r--library/src/visualize/shape.rs6
1 files changed, 4 insertions, 2 deletions
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<const S: ShapeKind> ShapeNode<S> {
/// How to fill the shape.
pub const FILL: Option<Paint> = None;
/// How to stroke the shape.
- #[property(skip, resolve, fold)]
+ #[property(reflect, skip, resolve, fold)]
pub const STROKE: Smart<Sides<Option<PartialStroke>>> = Smart::Auto;
/// How much to pad the shape's content.
@@ -36,7 +38,7 @@ impl<const S: ShapeKind> ShapeNode<S> {
pub const OUTSET: Sides<Option<Rel<Length>>> = 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<Option<Rel<Length>>> = Corners::splat(Rel::zero());
fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> {