-
Notifications
You must be signed in to change notification settings - Fork 142
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
Additional test cases for co-linear stroked curves #453
Conversation
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.
Presuming that there are no licensing issues with these, and a resolution for the going offscreen question
I haven't really reviewed what the tests are achieving, but they all render the same on CPU and GPU, and the new tests appear.
path.push(QuadTo(quad[0].into(), quad[1].into())); | ||
} | ||
let x = (idx % NUM_COLS) as f64 * CELL_SIZE; | ||
let y = (idx / NUM_COLS) as f64 * CELL_SIZE; |
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.
These now go off screen at the default window size
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 can adjust the CELL_SIZE to adapt to the number of rows (which fixes this on my external monitor).
The layout in general is sensitive to DPI, e.g. at the default window dimensions, everything fits and looks tiny on my MacBook's retina display, but enlarged on my external monitor. I've observed this with all the other test scenes too.
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.
The test scene now initializes the resolution
field of SceneParams
, which fixes the issue for me.
We have a new Android CI check so you'll need to rebase on |
261b748
to
cdd3381
Compare
Ported over some additional test cases from Skia's "tricky cubic strokes" tests that exercise co-linear quadratic curves. These used to render incorrectly until the recent kurbo update, so it's good to have these in Vello.
These new curves are technically conic sections with cusps in them (with weights 1, 0.3, and 1.5). Vello doesn't yet support rational Beziers, so Skia encodes a conic as a path composed of quadratics (with a tolerance of 0.25 which scaled by the applied transform). The new test cases encode the results of this conic->quad conversion.