Skip to content

Fix SVG blend isolation for artboards and thumbnails#4303

Open
YohYamasaki wants to merge 2 commits into
GraphiteEditor:masterfrom
YohYamasaki:fix-svg-blend-rendering
Open

Fix SVG blend isolation for artboards and thumbnails#4303
YohYamasaki wants to merge 2 commits into
GraphiteEditor:masterfrom
YohYamasaki:fix-svg-blend-rendering

Conversation

@YohYamasaki

Copy link
Copy Markdown
Contributor

Closes #4302

  • Move the artboard rect into the same level as the artwork content because SVG's clip-path creates an isolated group, which does not use external backdrops.
  • Add explicit isolation: isolate when there is no clipping by the artboard to prevent blending with the background checker pattern. The same applies to thumbnails.

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

Copy link
Copy Markdown
Contributor

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 introduces isolation styling to SVG outputs and artboard groups to prevent blending against the background checkerboard, and refactors artboard background rendering by moving it inside the artwork group. The review feedback points out a correctness issue where removing the x and y offset calculations breaks support for negative artboard dimensions, and provides a code suggestion to calculate local offsets relative to the group's origin.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread node-graph/libraries/rendering/src/renderer.rs

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 2 files

Confidence score: 3/5

  • In node-graph/libraries/rendering/src/renderer.rs, negative dimensions.x/dimensions.y can make the artboard background extend into negative space while the rect still defaults to x=0/y=0, so the background may be mispositioned or clipped for those groups; update the rect origin/size logic to account for negative dimensions before merging.

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread node-graph/libraries/rendering/src/renderer.rs
Normal situation will not create an artboard with negative dimension
as `create_artboard` normalizes it,
but it is still better to keep it in the renderer.
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.

SVG renderer ignores artboard color for blend modes

1 participant