mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-05 18:58:12 +08:00
Attribute-based vector format refactor (#1624)
* Initial vector format structure * Click targets * Code review pass * Remove subpaths from vector data * Morph node & vector node tests * Insignificant change --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
c8ea9e05a6
commit
218e9675fd
@@ -1,30 +1,6 @@
|
||||
use glam::DVec2;
|
||||
use std::fmt::{Debug, Formatter, Result};
|
||||
|
||||
/// Struct to represent optional parameters that can be passed to the `project` function.
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct ProjectionOptions {
|
||||
/// Size of the lookup table for the initial passthrough. The default value is `20`.
|
||||
pub lut_size: usize,
|
||||
/// Difference used between floating point numbers to be considered as equal. The default value is `0.0001`
|
||||
pub convergence_epsilon: f64,
|
||||
/// Controls the number of iterations needed to consider that minimum distance to have converged. The default value is `3`.
|
||||
pub convergence_limit: usize,
|
||||
/// Controls the maximum total number of iterations to be used. The default value is `10`.
|
||||
pub iteration_limit: usize,
|
||||
}
|
||||
|
||||
impl Default for ProjectionOptions {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
lut_size: 20,
|
||||
convergence_epsilon: 1e-4,
|
||||
convergence_limit: 3,
|
||||
iteration_limit: 10,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Struct used to represent the different strategies for generating arc approximations.
|
||||
#[derive(Copy, Clone)]
|
||||
pub enum ArcStrategy {
|
||||
|
||||
Reference in New Issue
Block a user