Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove deprecated drawing API surface #2297

Merged
merged 13 commits into from
Apr 16, 2022
Merged

Conversation

eonarheim
Copy link
Member

@eonarheim eonarheim commented Apr 15, 2022

===:clipboard: PR Checklist :clipboard:===

  • 📌 issue exists in github for these changes
  • 🔬 existing tests still pass
  • 🙈 code conforms to the style guide
  • 📐 new tests written and passing / old tests updated with new scenario(s)
  • 📄 changelog entry added (or not needed)

==================

This is related to the v0.26.0 roadmap #1161

The old drawing API had been removed from excalibur, this should not affect you unless you were using the ex.Flags.useLegacyDrawing() or ex.Flags.useCanvasGraphicsContext().

  • Notably all implementations of Drawable are removed, use the new Graphics API
  • Methods on actor ex.Actor.setDrawing(...), ex.Actor.addDrawing(...) are removed, use the ex.Actor.graphics.add(...), ex.Actor.graphics.show(...) and ex.Actor.graphics.use(...)
  • The ex.Actor.onPreDraw(...) and ex.Actor.onPostDraw(...) are removed, use ex.Actor.graphics.onPreDraw(...) and ex.Actor.graphics.onPostDraw(...)
  • The events predraw and postdraw are removed
  • ex.Scene.onPreDraw() and ex.Scene.onPostDraw() are now called with the ExcaliburGraphicsContext instead of an CanvasRenderingContext2D

There were 2 things added during in this process

  1. Bugfix, zero dimension bounding boxes were considered offscreen even when they were positioned on screen
  2. Scene clearing was implemented which was needed for some testing methods

@github-actions github-actions bot added the chore Maintenance tasks, like upgrading libraries or release tasks label Apr 15, 2022
@eonarheim eonarheim changed the title chore: Rremove deprecated drawing API surface chore: Remove deprecated drawing API surface Apr 16, 2022
@eonarheim eonarheim merged commit 98391f9 into main Apr 16, 2022
@eonarheim eonarheim deleted the chore/remove-old-drawing branch April 16, 2022 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Maintenance tasks, like upgrading libraries or release tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant