Skip to content

Fix inconsistent stroke width in 'Outline' view mode - #2417

Merged
Keavon merged 5 commits into
GraphiteEditor:masterfrom
EllenGYY:fix-outline-mode-stroke-width
Mar 10, 2025
Merged

Keavon merged 5 commits into
GraphiteEditor:masterfrom
EllenGYY:fix-outline-mode-stroke-width

Conversation

@EllenGYY

Copy link
Copy Markdown
Contributor

Closes #2387

This issue occurs in vectors that do not have a stroke node and have a transform scale other than 1. The problem arises because a "stroke" always exists, even if it is not explicitly present in the node graph—it simply defaults to a stroke with a weight of 0. However, in these cases, stroke.transform is not correctly set.

Since the stroke is considered valid regardless, the original check prevented it from falling back to instance.transform() when necessary. To fix this, I added an additional check to ensure that the stroke is only treated as valid if its weight is greater than 0. Otherwise, we should use the fallback instead of relying on the default stroke.transform.

@Keavon Keavon changed the title fix outline mode stroke width inconsistent Fix inconsistent stroke width in 'Outline' view mode Mar 10, 2025
@Keavon

Keavon commented Mar 10, 2025

Copy link
Copy Markdown
Member

!build

@github-actions

Copy link
Copy Markdown
📦 Build Complete for 7a78bc6
https://67e20e43.graphite.pages.dev

@Keavon

Keavon commented Mar 10, 2025

Copy link
Copy Markdown
Member

Thanks. You might want to move on to #2007 next which is similar and should be in the same file.

@Keavon
Keavon merged commit 7a3bb99 into GraphiteEditor:master Mar 10, 2025
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.

Outline view mode doesn't always render with a consistent thickness

2 participants