Fix Vello renderer cropping wide miter joins and square caps#4108
Fix Vello renderer cropping wide miter joins and square caps#4108
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new method max_aabb_inflation to the Stroke struct in vector-types, which calculates a worst-case upper bound for stroke extent by accounting for miter joins and square caps. The renderer in rendering has been updated to use this new method instead of effective_width when determining bounding box inflation, ensuring that compositing layers do not crop stroke geometry. I have no feedback to provide as there were no review comments to evaluate.
There was a problem hiding this comment.
Code Review
This pull request introduces a max_aabb_inflation method to the Stroke struct, providing a more accurate worst-case upper bound for stroke extent by accounting for miter joins and square caps. This new method replaces the use of effective_width in the renderer to ensure better clipping bounds. Feedback includes a correction for a double-scaling issue in the inflation calculation and a suggestion to rename a variable for consistency.
This bug occurs in Vello when a non-default alpha blending setting is used like an opacity <100%. The render bounds given to Vello was given with an incorrectly too-small worst-case area.
Vello (before):
SVG (unchanged) and Vello (after):