mirror of
https://github.com/penpot/penpot.git
synced 2025-05-18 10:56:13 +02:00
🎉 Recursive drawing shapes in rust
This commit is contained in:
parent
132b1800c2
commit
b149f96500
7 changed files with 76 additions and 60 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue