Skip to content

fix: attach save() to p5.Graphics.prototype #8881#8886

Open
BHARATH0153 wants to merge 1 commit into
processing:dev-2.0from
BHARATH0153:fix/graphics-save
Open

fix: attach save() to p5.Graphics.prototype #8881#8886
BHARATH0153 wants to merge 1 commit into
processing:dev-2.0from
BHARATH0153:fix/graphics-save

Conversation

@BHARATH0153

@BHARATH0153 BHARATH0153 commented Jun 9, 2026

Copy link
Copy Markdown

Resolves #8881

Changes

Fixed save() not working on p5.Graphics

Previously save() was only attached to p5.prototype via the files module (registered through p5.registerAddon), so pg.save("test.png") threw TypeError: pg.save is not a function.

Now the files module is also called with p5.Graphics.prototype inside the graphics() registration function, following the exact same pattern as all other modules (primitives2D, attributes, image, pixels, etc.).

PR Checklist

  • npm run lint passes
  • Inline reference is included / updated
  • Unit tests are included / updated

@BHARATH0153 BHARATH0153 changed the title fix: attach save() to p5.Graphics.prototype #8877 fix: attach save() to p5.Graphics.prototype #8881 Jun 9, 2026
@BHARATH0153

Copy link
Copy Markdown
Author

@perminder-17 please review

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