mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-09 09:18:13 +08:00
Bezier-rs: Add joins and caps to offsets and outlines (#1083)
* Intial work * Improve miter and add round join * Get arcs to go opposite direction * Add cap and other refactors * Rename joint to join, fix some bugs * Fix single point issue * Clean up * Fix iframe sizes and update UI * Address comments and handle single point outline * Rename variables, fix branches in outline * Address comments
This commit is contained in:
committed by
Keavon Chambers
parent
7e124c8035
commit
c0576ab4e0
@@ -211,6 +211,13 @@ impl Bezier {
|
||||
|
||||
self_points.len() == other_points.len() && self_points.into_iter().zip(other_points.into_iter()).all(|(a, b)| a.abs_diff_eq(b, max_abs_diff))
|
||||
}
|
||||
|
||||
/// Returns true if the start, end and handles of the Bezier are all at the same location
|
||||
pub fn is_point(&self) -> bool {
|
||||
let start = self.start();
|
||||
|
||||
self.get_points().all(|point| point.abs_diff_eq(start, MAX_ABSOLUTE_DIFFERENCE))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user