summaryrefslogtreecommitdiff
path: root/library/src/visualize/shape.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-08 13:02:41 +0100
committerLaurenz <laurmaedje@gmail.com>2023-03-08 14:35:33 +0100
commitd7a65fa26d131179d9d82226e5ee1b562084e48a (patch)
treec21ab20e9fb851e14e1ebea3e14fc351b1fdbcc9 /library/src/visualize/shape.rs
parente5eab73374880077971f3f22acbdd3d302877128 (diff)
Rework style chain access
Diffstat (limited to 'library/src/visualize/shape.rs')
-rw-r--r--library/src/visualize/shape.rs36
1 files changed, 18 insertions, 18 deletions
diff --git a/library/src/visualize/shape.rs b/library/src/visualize/shape.rs
index b3b9364f..fc1d462e 100644
--- a/library/src/visualize/shape.rs
+++ b/library/src/visualize/shape.rs
@@ -167,11 +167,11 @@ impl Layout for RectNode {
ShapeKind::Rect,
&self.body(),
Axes::new(self.width(), self.height()),
- styles.get(Self::FILL),
- styles.get(Self::STROKE),
- styles.get(Self::INSET),
- styles.get(Self::OUTSET),
- styles.get(Self::RADIUS),
+ Self::fill_in(styles),
+ Self::stroke_in(styles),
+ Self::inset_in(styles),
+ Self::outset_in(styles),
+ Self::radius_in(styles),
)
}
}
@@ -301,11 +301,11 @@ impl Layout for SquareNode {
ShapeKind::Square,
&self.body(),
Axes::new(self.width(), self.height()),
- styles.get(Self::FILL),
- styles.get(Self::STROKE),
- styles.get(Self::INSET),
- styles.get(Self::OUTSET),
- styles.get(Self::RADIUS),
+ Self::fill_in(styles),
+ Self::stroke_in(styles),
+ Self::inset_in(styles),
+ Self::outset_in(styles),
+ Self::radius_in(styles),
)
}
}
@@ -394,10 +394,10 @@ impl Layout for EllipseNode {
ShapeKind::Ellipse,
&self.body(),
Axes::new(self.width(), self.height()),
- styles.get(Self::FILL),
- styles.get(Self::STROKE).map(Sides::splat),
- styles.get(Self::INSET),
- styles.get(Self::OUTSET),
+ Self::fill_in(styles),
+ Self::stroke_in(styles).map(Sides::splat),
+ Self::inset_in(styles),
+ Self::outset_in(styles),
Corners::splat(Rel::zero()),
)
}
@@ -522,10 +522,10 @@ impl Layout for CircleNode {
ShapeKind::Circle,
&self.body(),
Axes::new(self.width(), self.height()),
- styles.get(Self::FILL),
- styles.get(Self::STROKE).map(Sides::splat),
- styles.get(Self::INSET),
- styles.get(Self::OUTSET),
+ Self::fill_in(styles),
+ Self::stroke_in(styles).map(Sides::splat),
+ Self::inset_in(styles),
+ Self::outset_in(styles),
Corners::splat(Rel::zero()),
)
}