diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-12-17 16:24:29 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-12-17 16:24:29 +0100 |
| commit | 35b16e545b4fce299edbc00c9a9754179fa51634 (patch) | |
| tree | eb1081e55187e59ff6482abc1ac2f1932606ef59 /library/src/visualize/shape.rs | |
| parent | b6202b646a0d5ecced301d9bac8bfcaf977d7ee4 (diff) | |
Document parameters in comment
Diffstat (limited to 'library/src/visualize/shape.rs')
| -rw-r--r-- | library/src/visualize/shape.rs | 21 |
1 files changed, 18 insertions, 3 deletions
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<Length> (named) +/// The shape's width. +/// - height: Rel<Length> (named) +/// The shape's height. +/// - size: Length (named) +/// The square's side length. +/// - radius: Length (named) +/// The circle's radius. +/// - stroke: Smart<Sides<Option<PartialStroke>>> (named) +/// How to stroke the shape. +/// +/// # Tags +/// - visualize #[func] #[capable(Layout, Inline)] #[derive(Debug, Hash)] @@ -27,7 +42,7 @@ impl<const S: ShapeKind> ShapeNode<S> { /// How to fill the shape. pub const FILL: Option<Paint> = None; /// How to stroke the shape. - #[property(reflect, skip, resolve, fold)] + #[property(skip, resolve, fold)] pub const STROKE: Smart<Sides<Option<PartialStroke>>> = Smart::Auto; /// How much to pad the shape's content. @@ -38,7 +53,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(reflect, skip, resolve, fold)] + #[property(skip, resolve, fold)] pub const RADIUS: Corners<Option<Rel<Length>>> = Corners::splat(Rel::zero()); fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> { |
