-
Notifications
You must be signed in to change notification settings - Fork 205
classic: implement dashed stroke clipping #1342
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
Conversation
| #[cfg(feature = "bump_estimate")] | ||
| self.estimator | ||
| .count_path(shape.path_elements(SHAPE_TOLERANCE), &t, Some(style)); | ||
| self.encoding.encode_shape(shape, false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't want to tackle (or think about) tolerances here, and this is just lifted directly from the code in main, but I'm not entirely sure this is correct... The Estimator::count_path call gets SHAPE_TOLERANCE passed in (with a value of 0.01), but the Encoding::encode_shape call has a hard-coded 0.1 tolerance.
Additionally, as the note about tolerances in Scene::stroke says, this does nothing for handling tolerance under scaling.
DJMcNab
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good.
|
We should probably also update the changelog to better reflect the support for stroked clips too. #1332 changelog seems to reflect the version before #1332 (comment) |
I'll probably get to this tonight! |
This follows up on #1332, implementing dashed stroke clipping as well.
The first commit here does just that (plus rejigging some of the control flow), the second factors out stroking logic shared with
Scene::stroketo a new private method.