mirror of
https://github.com/penpot/penpot.git
synced 2025-07-19 00:57:13 +02:00
♻️ Refactor wasm shapes state management
This commit is contained in:
parent
747427daa4
commit
69135ef8c7
10 changed files with 200 additions and 171 deletions
|
@ -4,13 +4,14 @@ use std::collections::HashMap;
|
|||
use crate::math::{Matrix, Rect};
|
||||
use crate::shapes::modifiers::grid_layout::grid_cell_data;
|
||||
use crate::shapes::{Shape, StructureEntry};
|
||||
use crate::state::ShapesPool;
|
||||
use crate::uuid::Uuid;
|
||||
|
||||
pub fn render_overlay(
|
||||
zoom: f32,
|
||||
canvas: &skia::Canvas,
|
||||
shape: &Shape,
|
||||
shapes: &HashMap<Uuid, &mut Shape>,
|
||||
shapes: &ShapesPool,
|
||||
modifiers: &HashMap<Uuid, Matrix>,
|
||||
structure: &HashMap<Uuid, Vec<StructureEntry>>,
|
||||
) {
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
use skia_safe::{self as skia, Color4f};
|
||||
use std::collections::HashMap;
|
||||
|
||||
use super::{RenderState, ShapesPool, SurfaceId};
|
||||
use crate::math::Matrix;
|
||||
use crate::render::grid_layout;
|
||||
use crate::shapes::{Shape, StructureEntry};
|
||||
use crate::shapes::StructureEntry;
|
||||
use crate::uuid::Uuid;
|
||||
|
||||
use super::{RenderState, SurfaceId};
|
||||
|
||||
pub fn render(
|
||||
render_state: &mut RenderState,
|
||||
shapes: &HashMap<Uuid, &mut Shape>,
|
||||
shapes: &ShapesPool,
|
||||
modifiers: &HashMap<Uuid, Matrix>,
|
||||
structure: &HashMap<Uuid, Vec<StructureEntry>>,
|
||||
) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue