diff options
Diffstat (limited to 'src/model/layout.rs')
| -rw-r--r-- | src/model/layout.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/model/layout.rs b/src/model/layout.rs index 63e8f088..3b82ddc2 100644 --- a/src/model/layout.rs +++ b/src/model/layout.rs @@ -8,8 +8,10 @@ use std::sync::Arc; use super::{Barrier, NodeId, Resolve, StyleChain, StyleEntry}; use crate::diag::TypResult; use crate::eval::{RawAlign, RawLength}; -use crate::frame::{Element, Frame, Geometry}; -use crate::geom::{Align, Length, Paint, Point, Relative, Sides, Size, Spec, Stroke}; +use crate::frame::{Element, Frame}; +use crate::geom::{ + Align, Geometry, Length, Paint, Point, Relative, Sides, Size, Spec, Stroke, +}; use crate::library::graphics::MoveNode; use crate::library::layout::{AlignNode, PadNode}; use crate::util::Prehashed; @@ -353,8 +355,7 @@ impl Layout for FillNode { ) -> TypResult<Vec<Arc<Frame>>> { let mut frames = self.child.layout(ctx, regions, styles)?; for frame in &mut frames { - let shape = Geometry::Rect(frame.size, Sides::splat(Length::zero())) - .filled(self.fill); + let shape = Geometry::Rect(frame.size).filled(self.fill); Arc::make_mut(frame).prepend(Point::zero(), Element::Shape(shape)); } Ok(frames) @@ -379,8 +380,7 @@ impl Layout for StrokeNode { ) -> TypResult<Vec<Arc<Frame>>> { let mut frames = self.child.layout(ctx, regions, styles)?; for frame in &mut frames { - let shape = Geometry::Rect(frame.size, Sides::splat(Length::zero())) - .stroked(self.stroke); + let shape = Geometry::Rect(frame.size).stroked(self.stroke); Arc::make_mut(frame).prepend(Point::zero(), Element::Shape(shape)); } Ok(frames) |
