Skip to content

Fix Windows DrawingView image rendering so exported/rendered strokes use the correct (round) line caps#3216

Merged
TheCodeTraveler merged 2 commits into
CommunityToolkit:mainfrom
MFinkBK:DrawingView-linecap-fix
May 11, 2026
Merged

Fix Windows DrawingView image rendering so exported/rendered strokes use the correct (round) line caps#3216
TheCodeTraveler merged 2 commits into
CommunityToolkit:mainfrom
MFinkBK:DrawingView-linecap-fix

Conversation

@MFinkBK
Copy link
Copy Markdown
Contributor

@MFinkBK MFinkBK commented May 11, 2026

Description of Change

Fixes rendering final image of DrawingView that was using wrong line cap style on Windows.

Linked Issues

PR Checklist

Additional information

No tests, as it can't be tested automatically. No documentation, as it's a bugfix.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes Windows DrawingView image rendering so exported/rendered strokes use the correct (round) line caps, addressing the visual artifacts reported in #3215 when LineWidth is large.

Changes:

  • Introduced a reusable CanvasStrokeStyle configured with round start/end caps.
  • Updated Win2D DrawLine calls to use the configured stroke style when rendering ink strokes.
  • Added the required Win2D geometry namespace import.

@TheCodeTraveler TheCodeTraveler changed the title Fix DrawingView on Windows Fix Windows DrawingView image rendering so exported/rendered strokes use the correct (round) line caps May 11, 2026
@TheCodeTraveler TheCodeTraveler requested a review from Copilot May 11, 2026 16:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown
Collaborator

@TheCodeTraveler TheCodeTraveler left a comment

Choose a reason for hiding this comment

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

Thanks @MFinkBK!

@TheCodeTraveler TheCodeTraveler merged commit c7cb65b into CommunityToolkit:main May 11, 2026
14 checks passed
@MFinkBK
Copy link
Copy Markdown
Contributor Author

MFinkBK commented May 12, 2026

@TheCodeTraveler You're welcome!

@MFinkBK MFinkBK deleted the DrawingView-linecap-fix branch May 12, 2026 05:07
@github-actions github-actions Bot locked and limited conversation to collaborators May 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] DrawingView with large LineWidth

3 participants