pathfinder
pathfinder copied to clipboard
Contour: Print no-op parts for alternate debug format
I'm working on a project where I'd like to print out the whole contour even if it's just a no-op (to maintain compatibility with an external project). It looks like there's already code in place to allow this conditionally, so what I propose is that the alternate debug implementation prints the whole string while the default debug maintains the current behavior.
Thoughts?
Given:
let mut path = Path2D::new();
path.move_to(Vector2F::new(1., 1.));
let path_string = path.into_outline();
Expect:
assert_eq!(format!("{:?}", path_string), " z");
// This would be new behavior
assert_eq!(format!("{:#?}", path_string), "M 1 1 L 1 1 z");