summaryrefslogtreecommitdiff
path: root/library/src/visualize/shape.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-12-14 10:09:44 +0100
committerLaurenz <laurmaedje@gmail.com>2022-12-14 10:09:44 +0100
commit9ba4d2c134479aad876a0e2ac4cd1622a353109e (patch)
treea94e0e6ae53a1ba440e869fca26cc2ea0b179057 /library/src/visualize/shape.rs
parent4c73456fc1f5df8ebb3a89d9db657c3c54624d66 (diff)
New macro setup
Diffstat (limited to 'library/src/visualize/shape.rs')
-rw-r--r--library/src/visualize/shape.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/src/visualize/shape.rs b/library/src/visualize/shape.rs
index 4517380a..702fc6f8 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.
+#[func]
+#[capable(Layout, Inline)]
#[derive(Debug, Hash)]
pub struct ShapeNode<const S: ShapeKind>(pub Option<Content>);
@@ -18,7 +20,7 @@ pub type CircleNode = ShapeNode<CIRCLE>;
/// A ellipse with optional content.
pub type EllipseNode = ShapeNode<ELLIPSE>;
-#[node(Layout, Inline)]
+#[node]
impl<const S: ShapeKind> ShapeNode<S> {
/// How to fill the shape.
pub const FILL: Option<Paint> = None;