mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 23:08:05 +08:00
Remove remnant dead code across the Subpath, Vector, and editor geometry API surfaces (#4454)
This commit is contained in:
committed by
Dennis Kobert
parent
698e81ff3a
commit
30333d6ec4
@@ -74,7 +74,7 @@ pub mod math {
|
||||
pub use core_types::math::quad;
|
||||
|
||||
pub mod math_ext {
|
||||
pub use vector_types::{QuadExt, RectExt};
|
||||
pub use vector_types::QuadExt;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,11 +40,7 @@ fn arc(
|
||||
radius,
|
||||
start_angle / 360. * std::f64::consts::TAU,
|
||||
sweep_angle / 360. * std::f64::consts::TAU,
|
||||
match arc_type {
|
||||
ArcType::Open => subpath::ArcType::Open,
|
||||
ArcType::Closed => subpath::ArcType::Closed,
|
||||
ArcType::PieSlice => subpath::ArcType::PieSlice,
|
||||
},
|
||||
arc_type,
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
@@ -4207,12 +4207,12 @@ mod test {
|
||||
#[test]
|
||||
fn bounding_box() {
|
||||
let bounding_box = with_ctx(|ctx| super::bounding_box(ctx, Vector::from_bezpath(Rect::new(-1., -1., 1., 1.).to_path(DEFAULT_ACCURACY))).unwrap());
|
||||
assert_eq!(bounding_box.region_manipulator_groups().count(), 1);
|
||||
assert_eq!(bounding_box.stroke_manipulator_groups().count(), 1);
|
||||
let manipulator_groups_anchors = bounding_box
|
||||
.region_manipulator_groups()
|
||||
.stroke_manipulator_groups()
|
||||
.next()
|
||||
.unwrap()
|
||||
.1
|
||||
.0
|
||||
.iter()
|
||||
.map(|manipulators| manipulators.anchor)
|
||||
.collect::<Vec<DVec2>>();
|
||||
@@ -4222,12 +4222,12 @@ mod test {
|
||||
// The box spans local space, so a lane rotation leaves it unchanged
|
||||
let square = Vector::from_bezpath(Rect::new(-1., -1., 1., 1.).to_path(DEFAULT_ACCURACY));
|
||||
let bounding_box = with_ctx(|ctx| super::bounding_box(ctx, square).unwrap());
|
||||
assert_eq!(bounding_box.region_manipulator_groups().count(), 1);
|
||||
assert_eq!(bounding_box.stroke_manipulator_groups().count(), 1);
|
||||
let manipulator_groups_anchors = bounding_box
|
||||
.region_manipulator_groups()
|
||||
.stroke_manipulator_groups()
|
||||
.next()
|
||||
.unwrap()
|
||||
.1
|
||||
.0
|
||||
.iter()
|
||||
.map(|manipulators| manipulators.anchor)
|
||||
.collect::<Vec<DVec2>>();
|
||||
|
||||
Reference in New Issue
Block a user