mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-07 22:08:13 +08:00
Added Subpaths to bezier-rs (#730)
* Added Subpath constructor, iterator and length * Asserted that subpaths of len < 2 cannot be closed. Added len() and comments * Added subpath to_svg(), made structs public, made quadratic use either in_handle or out_handle * add bezier handles * Added basic interactivity and index traits * Added SubPath interactivity * Added svg styling * Broke subpath impl across multiple files. More sylistic changes per review * Fixed format error * Added closed subpath to documentation page * Modified subpath to_svg to use functional style * Stylistic changes per review * Fixed build errors * More sylistic changes per review * Moved svg commands to constants * Moved formatting for svg arguments to ToSVGOptions * Renamed files in git * Even more stylistic changes per review
This commit is contained in:
@@ -19,3 +19,10 @@ pub const DEFAULT_LUT_STEP_SIZE: i32 = 10;
|
||||
pub const DEFAULT_LENGTH_SUBDIVISIONS: i32 = 1000;
|
||||
/// Default step size for `reduce` function.
|
||||
pub const DEFAULT_REDUCE_STEP_SIZE: f64 = 0.01;
|
||||
|
||||
// SVG constants
|
||||
pub const SVG_ARG_CUBIC: &str = "C";
|
||||
pub const SVG_ARG_LINEAR: &str = "L";
|
||||
pub const SVG_ARG_MOVE: &str = "M";
|
||||
pub const SVG_ARG_QUADRATIC: &str = "Q";
|
||||
pub const SVG_ARG_CLOSED: &str = "Z";
|
||||
|
||||
Reference in New Issue
Block a user