Skip to content

Improve graphic List<T> fill/stroke paint handling#4240

Open
YohYamasaki wants to merge 4 commits into
GraphiteEditor:masterfrom
YohYamasaki:improve-vector-painting-with-List
Open

Improve graphic List<T> fill/stroke paint handling#4240
YohYamasaki wants to merge 4 commits into
GraphiteEditor:masterfrom
YohYamasaki:improve-vector-painting-with-List

Conversation

@YohYamasaki

@YohYamasaki YohYamasaki commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Fix/improvements on #4111.

  • Fix empty color list ignoring paint target: When an empty List<Color> is passed in during svg vector rendering, the paint attribute name did not respect the paint target, and always used "fill". This is currently unreachable, but it is possible that the empty List<Color> will represent empty paint, so it is better to have this check.
  • Avoid cloning renderable lists for paint presence checks: Some checks were cloning the entire graphic just to see if the paint exists, which can be avoided by borrowing.
  • Make singular matrix check more robust: Add a check for when the determinant becomes +0 or -0 (not exactly 0), as this can cause overflow and the inverse matrix becomes inf.

@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.

No issues found across 3 files

Confidence score: 5/5

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

Re-trigger cubic

@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 a new helper function has_paint_at to check for non-blank paint attributes without cloning, simplifies fill checks, refactors stroke transparency logic, and dynamically formats paint attributes during color list rendering. The feedback suggests refactoring the newly added has_paint_at function into a single, more concise boolean expression to improve readability and remove the explicit return statement.

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/graphic-types/src/graphic.rs
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