Skip to content

Contour: Print no-op parts for alternate debug format#473

Open
inferiorhumanorgans wants to merge 1 commit intoservo:mainfrom
inferiorhumanorgans:iho/verbose-empty-contour
Open

Contour: Print no-op parts for alternate debug format#473
inferiorhumanorgans wants to merge 1 commit intoservo:mainfrom
inferiorhumanorgans:iho/verbose-empty-contour

Conversation

@inferiorhumanorgans
Copy link
Contributor

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");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant