🎉 Recursive drawing shapes in rust

This commit is contained in:
Alejandro Alonso 2024-11-12 15:56:33 +01:00
parent 132b1800c2
commit b149f96500
7 changed files with 76 additions and 60 deletions

View file

@ -50,9 +50,10 @@ impl Matrix {
}
}
#[derive(Debug, Clone, Copy)]
#[derive(Debug, Clone)]
pub struct Shape {
pub id: Uuid,
pub shapes: Vec::<Uuid>,
pub kind: Kind,
pub selrect: Rect,
pub transform: Matrix,
@ -63,6 +64,7 @@ impl Shape {
pub fn new(id: Uuid) -> Self {
Self {
id,
shapes: Vec::<Uuid>::new(),
kind: Kind::Rect,
selrect: Rect::default(),
transform: Matrix::identity(),