summaryrefslogtreecommitdiff
path: root/src/library/shape.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-02-02 16:02:23 +0100
committerLaurenz <laurmaedje@gmail.com>2022-02-02 16:02:23 +0100
commita7b403fd742941f6b163f06876aec96729db707f (patch)
treeb5062eddbcb814713b65f59d3f59dfe7e2bcaca8 /src/library/shape.rs
parent0a1916c1e4259aff1306b26c06d4edcf0f190a3b (diff)
Rename `Node` to `Template`
Diffstat (limited to 'src/library/shape.rs')
-rw-r--r--src/library/shape.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/library/shape.rs b/src/library/shape.rs
index 0dd75c08..8ac9956f 100644
--- a/src/library/shape.rs
+++ b/src/library/shape.rs
@@ -5,7 +5,7 @@ use std::f64::consts::SQRT_2;
use super::prelude::*;
use super::TextNode;
-/// Places its child into a sizable and fillable shape.
+/// Place a node into a sizable and fillable shape.
#[derive(Debug, Hash)]
pub struct ShapeNode<S: ShapeKind> {
/// Which shape to place the child into.
@@ -25,7 +25,7 @@ impl<S: ShapeKind> ShapeNode<S> {
/// How much to pad the shape's content.
pub const PADDING: Linear = Linear::zero();
- fn construct(_: &mut EvalContext, args: &mut Args) -> TypResult<Node> {
+ fn construct(_: &mut EvalContext, args: &mut Args) -> TypResult<Template> {
let size = if !S::ROUND && S::QUADRATIC {
args.named::<Length>("size")?.map(Linear::from)
} else if S::ROUND && S::QUADRATIC {
@@ -44,7 +44,7 @@ impl<S: ShapeKind> ShapeNode<S> {
size => size,
};
- Ok(Node::inline(
+ Ok(Template::inline(
ShapeNode { kind: S::default(), child: args.find() }
.pack()
.sized(Spec::new(width, height)),