Fix SVG even-odd fill rule imports (#4332)#4337
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for explicit vector fill rules (NonZero and EvenOdd) across the application. This includes defining the FillRule enum, updating the fill node to accept a fill rule input, implementing SVG and canvas rendering support for even-odd fills, and adding document migration logic to upgrade legacy fill nodes. Feedback suggests optimizing the document migration logic to avoid redundant node replacements when upgrading legacy fill nodes.
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.
| @@ -1667,6 +1667,22 @@ fn migrate_node(node_id: &NodeId, node: &DocumentNode, network_path: &[NodeId], | |||
| inputs_count = 7; | |||
There was a problem hiding this comment.
By directly setting the default FillRule input and updating inputs_count to 8 at the end of the inputs_count == 4 migration block, we can avoid entering the subsequent inputs_count == 7 block. This prevents redundant calls to replace_implementation and replace_inputs for the same node during a single migration pass, improving performance and reducing overhead.
| inputs_count = 7; | |
| document | |
| .network_interface | |
| .set_input(&InputConnector::node(*node_id, 7), NodeInput::value(TaggedValue::FillRule(FillRule::NonZero), false), network_path); | |
| inputs_count = 8; |
There was a problem hiding this comment.
This was done to prevent other tests from failing.
There was a problem hiding this comment.
All reported issues were addressed
Confidence score: 5/5
- Safe to merge after the addressed issues were fixed.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
• ## Summary
Fixes SVG imports ignoring fill-rule="evenodd".
Testing
Closes #4332.