summaryrefslogtreecommitdiff
path: root/src/library/graphics
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-06-13 23:16:40 +0200
committerLaurenz <laurmaedje@gmail.com>2022-06-14 13:53:02 +0200
commitc81e2a5f56eb262663f292578c683fba7f18251f (patch)
tree6c045a8dcbec5e75e01a15f970ef8cee6ff042d0 /src/library/graphics
parent891af17260a6750a74a102388a05e59cf1ffc3c1 (diff)
Many fixes
Diffstat (limited to 'src/library/graphics')
-rw-r--r--src/library/graphics/hide.rs3
-rw-r--r--src/library/graphics/shape.rs2
-rw-r--r--src/library/graphics/transform.rs2
3 files changed, 3 insertions, 4 deletions
diff --git a/src/library/graphics/hide.rs b/src/library/graphics/hide.rs
index 0ed02d1b..f40635a0 100644
--- a/src/library/graphics/hide.rs
+++ b/src/library/graphics/hide.rs
@@ -19,12 +19,9 @@ impl Layout for HideNode {
styles: StyleChain,
) -> TypResult<Vec<Frame>> {
let mut frames = self.0.layout(ctx, regions, styles)?;
-
- // Clear the frames.
for frame in &mut frames {
frame.clear();
}
-
Ok(frames)
}
}
diff --git a/src/library/graphics/shape.rs b/src/library/graphics/shape.rs
index bf581815..eed3c9d9 100644
--- a/src/library/graphics/shape.rs
+++ b/src/library/graphics/shape.rs
@@ -165,7 +165,7 @@ impl<const S: ShapeKind> Layout for ShapeNode<S> {
frame.prepend(pos, Element::Shape(shape));
} else {
frame.prepend_multiple(
- Rect::new(size, radius)
+ RoundedRect::new(size, radius)
.shapes(fill, stroke)
.into_iter()
.map(|x| (pos, Element::Shape(x))),
diff --git a/src/library/graphics/transform.rs b/src/library/graphics/transform.rs
index 2a0149bc..48cadb1b 100644
--- a/src/library/graphics/transform.rs
+++ b/src/library/graphics/transform.rs
@@ -107,6 +107,8 @@ impl<const T: TransformKind> Layout for TransformNode<T> {
}
/// Kinds of transformations.
+///
+/// The move transformation is handled separately.
pub type TransformKind = usize;
/// A rotational transformation.