mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 01:28:11 +08:00
Lay Groundwork for Rust-based SVG rasterization (#1422)
* Add functions for constructing a usvg tree * Actually encode the image in the usvg tree * Implement path translation * Render document using resvg
This commit is contained in:
committed by
Keavon Chambers
parent
34f2d61257
commit
e1cdb2242d
@@ -16,7 +16,7 @@ use std::fmt::{Debug, Formatter, Result};
|
||||
/// Representation of the handle point(s) in a bezier segment.
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||
enum BezierHandles {
|
||||
pub enum BezierHandles {
|
||||
Linear,
|
||||
/// Handles for a quadratic curve.
|
||||
Quadratic {
|
||||
@@ -42,11 +42,11 @@ unsafe impl dyn_any::StaticType for BezierHandles {
|
||||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||
pub struct Bezier {
|
||||
/// Start point of the bezier curve.
|
||||
start: DVec2,
|
||||
pub start: DVec2,
|
||||
/// Start point of the bezier curve.
|
||||
end: DVec2,
|
||||
pub end: DVec2,
|
||||
/// Handles of the bezier curve.
|
||||
handles: BezierHandles,
|
||||
pub handles: BezierHandles,
|
||||
}
|
||||
|
||||
impl Debug for Bezier {
|
||||
|
||||
@@ -16,7 +16,7 @@ use std::ops::{Index, IndexMut};
|
||||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||
pub struct Subpath<ManipulatorGroupId: crate::Identifier> {
|
||||
manipulator_groups: Vec<ManipulatorGroup<ManipulatorGroupId>>,
|
||||
closed: bool,
|
||||
pub closed: bool,
|
||||
}
|
||||
|
||||
#[cfg(feature = "dyn-any")]
|
||||
|
||||
Reference in New Issue
Block a user