Skip to content

Fix Vello renderer cropping open paths with Inside-aligned strokes and an opacity or blend mode set#4109

Merged
Keavon merged 5 commits intomasterfrom
fix-blend-layer-cropping-open-path-strokes
May 6, 2026
Merged

Fix Vello renderer cropping open paths with Inside-aligned strokes and an opacity or blend mode set#4109
Keavon merged 5 commits intomasterfrom
fix-blend-layer-cropping-open-path-strokes

Conversation

@Keavon
Copy link
Copy Markdown
Member

@Keavon Keavon commented May 6, 2026

This bug occurs in Vello when a non-default alpha blending setting is used like an opacity <100%. The render bounds given to Vello were incorrect when the path is open and the stroke align (which isn't valid for open paths) is set to Inside.

Vello (before):

image

SVG (unchanged) and Vello (after):

image

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the max_aabb_inflation method to include a path_is_closed parameter, ensuring that stroke alignment is correctly handled for open versus closed paths during bounding box calculations. The feedback identifies a performance optimization opportunity in renderer.rs where path traversal and stroke cloning can be minimized by caching the stroke and short-circuiting the closed-path check when the stroke is centered or non-renderable.

Comment thread node-graph/libraries/rendering/src/renderer.rs Outdated
@Keavon Keavon changed the title Fix Vello renderer cropping shapes with Inside-aligned strokes and an opacity or blend mode set Fix Vello renderer cropping open paths with Inside-aligned strokes and an opacity or blend mode set May 6, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="node-graph/libraries/rendering/src/renderer.rs">

<violation number="1" location="node-graph/libraries/rendering/src/renderer.rs:253">
P1: Clip/layer inflation uses column-length min/max, which is not conservative under shear and can still crop strokes.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread node-graph/libraries/rendering/src/renderer.rs Outdated
@Keavon Keavon merged commit 269a217 into master May 6, 2026
11 checks passed
@Keavon Keavon deleted the fix-blend-layer-cropping-open-path-strokes branch May 6, 2026 07:28
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