Skip to content

Remove legacy style-related structs#4297

Draft
YohYamasaki wants to merge 27 commits into
GraphiteEditor:masterfrom
YohYamasaki:remove-legacy-style-structs
Draft

Remove legacy style-related structs#4297
YohYamasaki wants to merge 27 commits into
GraphiteEditor:masterfrom
YohYamasaki:remove-legacy-style-structs

Conversation

@YohYamasaki

Copy link
Copy Markdown
Contributor

Part of #2779.

This PR is a follow-up to #4257. It must be merged first and then this branch will be rebased against the master.

As we now use attributes with List<T> for the fill and stroke paints, some of the style-related structures and enumerations have become obsolete. This PR involves refactoring to remove these, such as...

  • the Gradient struct
  • the 'Fill' enum
  • the 'color' field of the 'Stroke' struct
  • the 'PathStyle' struct

Legacy representations are kept only where needed for document migration.

…crete types

Store fill/stroke paints as List<Graphic> so Color/Gradient transitions
do not hit set_attribute_value_dyn's type-mismatch fallback to default paint.
# Conflicts:
#	node-graph/nodes/vector/src/vector_nodes.rs
- Remove unnecessary wrapper functions
- Use `as_ref` instead of `clone` for stroke if possible
- Comment cleanup

@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 refactors the vector graphics style system by replacing the legacy Fill enum and PathStyle struct with a more flexible, attribute-based paint system using ATTR_FILL and ATTR_STROKE with AnyGraphicListDyn. The Stroke struct has been updated to remove its color field, which is now managed via attributes. Various tools, nodes (such as fill, stroke, boolean operations, and morphing), and document migration paths have been updated to support this new value-model paint system. I have no feedback to provide as there are no review comments.

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.

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