Title: Fix PGraphicsJava2D.copy() when src is of same class by thobbs · Pull Request #6013 · processing/processing · GitHub
Open Graph Title: Fix PGraphicsJava2D.copy() when src is of same class by thobbs · Pull Request #6013 · processing/processing
X Title: Fix PGraphicsJava2D.copy() when src is of same class by thobbs · Pull Request #6013 · processing/processing
Description: Using copy() a PGraphicsJava2D with a src that is also PGraphicsJava2D will produce the following error: class sun.java2d.SunGraphics2D cannot be cast to class java.awt.Image This is due to PGraphicsJava2D.native() returning g2 (a PGraphicsJava2D instance) rather than a java.awt.Image instance, which is what the cast here expects. I've added specific handling for src being PGraphicsJava2D, as well as general handling of other non-Image results from src.getNative(). I built and tested this solution locally.
Open Graph Description: Using copy() a PGraphicsJava2D with a src that is also PGraphicsJava2D will produce the following error: class sun.java2d.SunGraphics2D cannot be cast to class java.awt.Image This is due to PGraphi...
X Description: Using copy() a PGraphicsJava2D with a src that is also PGraphicsJava2D will produce the following error: class sun.java2d.SunGraphics2D cannot be cast to class java.awt.Image This is due to PGraphi...
Opengraph URL: https://github.com/processing/processing/pull/6013
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:43be80a6-04c1-96fc-95d8-2a3408668c63 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9A9C:3BB1CB:F26E07:1560B01:696F525A |
| html-safe-nonce | bc50e3dfe4cfec08774f775f49ec21cb1a4819f677c783357d7e1ae6b043ee73 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTlDOjNCQjFDQjpGMjZFMDc6MTU2MEIwMTo2OTZGNTI1QSIsInZpc2l0b3JfaWQiOiI1MjYwOTMyNTEzODE4MTY5OTQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9aaf8a4fcf947e4ba87b80ffb38e1f84fc4285cb1fa9161a422f93b26cbfb160 |
| hovercard-subject-tag | pull_request:393640531 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/processing/processing/pull/6013/files |
| twitter:image | https://avatars.githubusercontent.com/u/355580?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/355580?s=400&v=4 |
| og:image:alt | Using copy() a PGraphicsJava2D with a src that is also PGraphicsJava2D will produce the following error: class sun.java2d.SunGraphics2D cannot be cast to class java.awt.Image This is due to PGraphi... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 49bb2ee76ae1b4ec758faefafda636ff20b05a9708bb290d28422cdf542ae979 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/processing/processing git https://github.com/processing/processing.git |
| octolytics-dimension-user_id | 1617169 |
| octolytics-dimension-user_login | processing |
| octolytics-dimension-repository_id | 7807399 |
| octolytics-dimension-repository_nwo | processing/processing |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7807399 |
| octolytics-dimension-repository_network_root_nwo | processing/processing |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 036f37fe552777ac9c6ee661957f947285aab936 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width