From 35b16e545b4fce299edbc00c9a9754179fa51634 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sat, 17 Dec 2022 16:24:29 +0100 Subject: Document parameters in comment --- library/src/visualize/shape.rs | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'library/src/visualize/shape.rs') diff --git a/library/src/visualize/shape.rs b/library/src/visualize/shape.rs index a3443189..be80b4fb 100644 --- a/library/src/visualize/shape.rs +++ b/library/src/visualize/shape.rs @@ -4,7 +4,22 @@ use crate::prelude::*; /// A sizable and fillable shape with optional content. /// -/// Tags: visualize. +/// # Parameters +/// - body: Content (positional) +/// The content to place into the shape. +/// - width: Rel (named) +/// The shape's width. +/// - height: Rel (named) +/// The shape's height. +/// - size: Length (named) +/// The square's side length. +/// - radius: Length (named) +/// The circle's radius. +/// - stroke: Smart>> (named) +/// How to stroke the shape. +/// +/// # Tags +/// - visualize #[func] #[capable(Layout, Inline)] #[derive(Debug, Hash)] @@ -27,7 +42,7 @@ impl ShapeNode { /// How to fill the shape. pub const FILL: Option = None; /// How to stroke the shape. - #[property(reflect, skip, resolve, fold)] + #[property(skip, resolve, fold)] pub const STROKE: Smart>> = Smart::Auto; /// How much to pad the shape's content. @@ -38,7 +53,7 @@ impl ShapeNode { pub const OUTSET: Sides>> = Sides::splat(Rel::zero()); /// How much to round the shape's corners. - #[property(reflect, skip, resolve, fold)] + #[property(skip, resolve, fold)] pub const RADIUS: Corners>> = Corners::splat(Rel::zero()); fn construct(_: &Vm, args: &mut Args) -> SourceResult { -- cgit v1.2.3