From 1b2b53ecb91a9bd7fb3493e471ae03cd142a7c03 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 8 Mar 2023 10:43:03 +0100 Subject: Require font to be a named argument --- library/src/visualize/line.rs | 9 ++++----- library/src/visualize/shape.rs | 21 +++++---------------- 2 files changed, 9 insertions(+), 21 deletions(-) (limited to 'library/src/visualize') diff --git a/library/src/visualize/line.rs b/library/src/visualize/line.rs index 0e0a272f..6fc7fc19 100644 --- a/library/src/visualize/line.rs +++ b/library/src/visualize/line.rs @@ -10,10 +10,6 @@ use crate::prelude::*; /// ``` /// /// ## Parameters -/// - start: `Axes>` (named) -/// The start point of the line. -/// Must be an array of exactly two relative lengths. -/// /// - end: `Axes>` (named) /// The end point of the line. /// Must be an array of exactly two relative lengths. @@ -29,7 +25,9 @@ use crate::prelude::*; /// Category: visualize #[node(Construct, Layout)] pub struct LineNode { - /// Where the line starts. + /// The start point of the line. + /// + /// Must be an array of exactly two relative lengths. #[named] #[default] pub start: Axes>, @@ -37,6 +35,7 @@ pub struct LineNode { /// The offset from `start` where the line ends. #[named] #[default] + #[skip] pub delta: Axes>, /// How to stroke the line. This can be: diff --git a/library/src/visualize/shape.rs b/library/src/visualize/shape.rs index ef81a871..b3b9364f 100644 --- a/library/src/visualize/shape.rs +++ b/library/src/visualize/shape.rs @@ -190,6 +190,11 @@ impl Layout for RectNode { /// ] /// ``` /// +/// ## Parameters +/// - size: `Smart` (named) +/// The square's side length. This is mutually exclusive with `width` and +/// `height`. +/// /// Display: Square /// Category: visualize #[node(Construct, Layout)] @@ -414,26 +419,10 @@ impl Layout for EllipseNode { /// ``` /// /// ## Parameters -/// - body: `Content` (positional) -/// The content to place into the circle. The circle expands to fit this -/// content, keeping the 1-1 aspect ratio. -/// /// - radius: `Length` (named) /// The circle's radius. This is mutually exclusive with `width` and /// `height`. /// -/// - width: `Rel` (named) -/// The circle's width. This is mutually exclusive with `radius` and `height`. -/// -/// In contrast to `size`, this can be relative to the parent container's -/// width. -/// -/// - height: `Rel` (named) -/// The circle's height.This is mutually exclusive with `radius` and `width`. -/// -/// In contrast to `size`, this can be relative to the parent container's -/// height. -/// /// Display: Circle /// Category: visualize #[node(Construct, Layout)] -- cgit v1.2.3