Skip to content

fix : other shape use the shape class also add new roundrect Primitive#8899

Merged
davepagurek merged 5 commits into
processing:mainfrom
VANSH3104:fix/other-shape-to-class
Jun 11, 2026
Merged

fix : other shape use the shape class also add new roundrect Primitive#8899
davepagurek merged 5 commits into
processing:mainfrom
VANSH3104:fix/other-shape-to-class

Conversation

@VANSH3104

@VANSH3104 VANSH3104 commented Jun 10, 2026

Copy link
Copy Markdown
Member

Resolves #8277

Changes:

Renderer2D refactor

  • Refactored line(), point(), triangle(), quad(), and rect() to create and render p5.Shape instances through drawShape().

New RectPrimitive

  • Added RectPrimitive to represent rectangles and rounded rectangles as shape primitives.
  • Added Shape.rectPrimitive() helper.
  • Preserves rounded-corner radius handling and clipping behavior through the shape system.

Screenshots of the change:

PR Checklist

@p5-bot

p5-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown

Continuous Release

CDN link

Published Packages

Commit hash: 820896d

Previous deployments

300276c


This is an automated message.

@VANSH3104

VANSH3104 commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

@davepagurek, can you please review the changes and add comments?

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

Thanks, this looks good! Do we already have visual tests for rectangles, both rounded and not rounded, in 2D mode, or do we need to add some to make sure it renders the same?

@VANSH3104

Copy link
Copy Markdown
Member Author

we have visual test only for rectangle but we need to add for rounded rect

@VANSH3104 VANSH3104 requested a review from davepagurek June 11, 2026 10:34
@davepagurek

Copy link
Copy Markdown
Contributor

Awesome, looks good!

@davepagurek davepagurek merged commit 1561d67 into processing:main Jun 11, 2026
4 checks passed
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.

[p5.js 2.0 Bug Report]: Not all primitive shape drawing goes through internal p5.Shape

2 participants