mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 23:38:06 +08:00
Refactor vector data type from document-legacy into node graph (#1057)
Add vector data type
This commit is contained in:
22
document-legacy/src/layers/render_data.rs
Normal file
22
document-legacy/src/layers/render_data.rs
Normal 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,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user