Decouple caching from layering and simplify everything
This commit is contained in:
parent
4a356cfc16
commit
6d3e1d835e
15 changed files with 896 additions and 1199 deletions
|
|
@ -33,9 +33,12 @@ where
|
|||
}
|
||||
|
||||
impl Rectangle<f32> {
|
||||
/// A rectangle starting at [`Point::ORIGIN`] with infinite width and height.
|
||||
pub const INFINITE: Self = Self::new(Point::ORIGIN, Size::INFINITY);
|
||||
|
||||
/// Creates a new [`Rectangle`] with its top-left corner in the given
|
||||
/// [`Point`] and with the provided [`Size`].
|
||||
pub fn new(top_left: Point, size: Size) -> Self {
|
||||
pub const fn new(top_left: Point, size: Size) -> Self {
|
||||
Self {
|
||||
x: top_left.x,
|
||||
y: top_left.y,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue