add image to frame layer

This commit is contained in:
griffi-gh 2024-03-22 18:35:00 +01:00
parent 64640f215a
commit d1732fe2b7

View file

@ -2,7 +2,11 @@
use glam::{Vec2, vec2}; use glam::{Vec2, vec2};
use derive_more::{Add, AddAssign, Sub, SubAssign}; use derive_more::{Add, AddAssign, Sub, SubAssign};
use crate::{element::fill_rect::FillRect, layout::{Size, Size2d}}; use crate::{
draw::ImageHandle,
element::fill_rect::FillRect,
layout::{Size, Size2d}
};
/// Point inside a frame /// Point inside a frame
/// ///
@ -133,7 +137,8 @@ impl FramePoint2d {
enum FrameLayer { enum FrameLayer {
Rect { Rect {
fill: FillRect, color: FillRect,
image: Option<ImageHandle>,
top_left: FramePoint2d, top_left: FramePoint2d,
bottom_right: FramePoint2d, bottom_right: FramePoint2d,
} }