Skip to content

Conversation

@tomcur
Copy link
Member

@tomcur tomcur commented Jan 5, 2026

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::stroke to a new private method.

Comment on lines +421 to +424
#[cfg(feature = "bump_estimate")]
self.estimator
.count_path(shape.path_elements(SHAPE_TOLERANCE), &t, Some(style));
self.encoding.encode_shape(shape, false)
Copy link
Member Author

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.

@nicoburns nicoburns added the C-classic Applies to the classic `vello` crate label Jan 7, 2026
Copy link
Member

@DJMcNab DJMcNab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good.

@DJMcNab
Copy link
Member

DJMcNab commented Jan 8, 2026

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)

@tomcur
Copy link
Member Author

tomcur commented Jan 8, 2026

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!

@tomcur tomcur enabled auto-merge January 8, 2026 21:14
@tomcur tomcur added this pull request to the merge queue Jan 8, 2026
Merged via the queue into linebender:main with commit 337a5c3 Jan 8, 2026
17 checks passed
@tomcur tomcur deleted the dashed-clips branch January 8, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-classic Applies to the classic `vello` crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants