Refactor vector data type from document-legacy into node graph (#1057)

Add vector data type
This commit is contained in:
0HyperCube
2023-02-25 16:55:05 +00:00
committed by GitHub
parent d3038665ac
commit ba50614af1
20 changed files with 140 additions and 101 deletions

View File

@@ -0,0 +1,22 @@
use super::style::ViewMode;
use super::text_layer::FontCache;
use glam::DVec2;
/// Contains metadata for rendering the document as an svg
#[derive(Debug, Clone, Copy)]
pub struct RenderData<'a> {
pub font_cache: &'a FontCache,
pub view_mode: ViewMode,
pub culling_bounds: Option<[DVec2; 2]>,
}
impl<'a> RenderData<'a> {
pub fn new(font_cache: &'a FontCache, view_mode: ViewMode, culling_bounds: Option<[DVec2; 2]>) -> Self {
Self {
font_cache,
view_mode,
culling_bounds,
}
}
}