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/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:c23fb251-5ebc-92b7-69ad-60d28b5dde54 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 9DB6:8EA56:102FE02:16E4308:696F54B6 |
| html-safe-nonce | d21656cd9e8f77e14af04adfcc046fc97b65166fc25fc54f108738e983ddcc77 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5REI2OjhFQTU2OjEwMkZFMDI6MTZFNDMwODo2OTZGNTRCNiIsInZpc2l0b3JfaWQiOiI1MTQ1MjMzOTg0NzE4ODUzMzAyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 85d4e871415a206880007bd9d5f65627cc16b9ed448afc03d769cd2431dab768 |
| hovercard-subject-tag | pull_request:393640531 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/checks |
| 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 |
| 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 full-width full-width-p-0 |
| disable-turbo | false |
| 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