Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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