mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 07:18:04 +08:00
* Initial work towards text to node * Add the text generate node * Implement live edit * Fix merge error * Cleanup text tool * Implement text * Fix transforms * Fix broken image frame * Double click to edit text * Fix rendering text on load * Moving whilst editing * Better text properties * Prevent changing vector when there is a Text node * Push node api * Use node fn macro * Stable ids * Image module as a seperate file * Explain check for "Input Frame" node * Code review --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
23 lines
499 B
Rust
23 lines
499 B
Rust
use super::style::ViewMode;
|
|
use graphene_std::text::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,
|
|
}
|
|
}
|
|
}
|