mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-29 17:08:11 +08:00
Bezier-rs: Add trim for Subpath (#1006)
* Move compare.rs * Update traits for Subpath and ManipulatorGroup * Implement trim * UI adjustments and more tests * Add reverse, refactor code, rename variables * Improve comments * Comment nits * Address comments * Update trim behavior * Update doc comment for trim --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
ba50614af1
commit
8293f730f2
@@ -31,15 +31,11 @@ pub struct ManipulatorGroup<ManipulatorGroupId: crate::Identifier> {
|
||||
|
||||
impl<ManipulatorGroupId: crate::Identifier> Debug for ManipulatorGroup<ManipulatorGroupId> {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
|
||||
if self.in_handle.is_some() && self.out_handle.is_some() {
|
||||
write!(f, "anchor: {}, in: {}, out: {}", self.anchor, self.in_handle.unwrap(), self.out_handle.unwrap())
|
||||
} else if self.in_handle.is_some() {
|
||||
write!(f, "anchor: {}, in: {}, out: n/a", self.anchor, self.in_handle.unwrap())
|
||||
} else if self.out_handle.is_some() {
|
||||
write!(f, "anchor: {}, in: n/a, out: {}", self.anchor, self.out_handle.unwrap())
|
||||
} else {
|
||||
write!(f, "anchor: {}, in: n/a, out: n/a", self.anchor)
|
||||
}
|
||||
f.debug_struct("ManipulatorGroup")
|
||||
.field("anchor", &self.anchor)
|
||||
.field("in_handle", &self.in_handle)
|
||||
.field("out_handle", &self.out_handle)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user