Title: Continuous zoom and direct rendering by flimsyhat · Pull Request #79 · plotdevice/plotdevice · GitHub
Open Graph Title: Continuous zoom and direct rendering by flimsyhat · Pull Request #79 · plotdevice/plotdevice
X Title: Continuous zoom and direct rendering by flimsyhat · Pull Request #79 · plotdevice/plotdevice
Description: This PR adds the ability to continuously zoom in and out on the PlotDevice canvas with a trackpad or mouse. It also improves rendering performance by replacing the bitmap-based approach with directly rendering to the graphic context. Continuous zoom Added pinch-to-zoom gesture support Added Command+scroll for zooming zoom_demo.mov Direct render approach Previously, the GraphicsView would pre-render the entire canvas to a bitmap (NSImage) at the current zoom level, convert it to a CALayer's contents, and display that layer. This has been replaced by directly drawing to the view's graphics context, with viewport clipping to only draw the visible portion of the canvas. This avoids potentially expensive pre-rendering and caching, which can be significantly faster for large scenes or high zoom levels: This is particularly helpful when working with animations, since each frame draws faster: animation_test.mp4 Note: The old bitmap approach was smoother when scrolling at high zoom (just moving a cached bitmap around instead of redrawing), but overall I think the benefits of direct drawing outweigh this.
Open Graph Description: This PR adds the ability to continuously zoom in and out on the PlotDevice canvas with a trackpad or mouse. It also improves rendering performance by replacing the bitmap-based approach with direct...
X Description: This PR adds the ability to continuously zoom in and out on the PlotDevice canvas with a trackpad or mouse. It also improves rendering performance by replacing the bitmap-based approach with direct...
Opengraph URL: https://github.com/plotdevice/plotdevice/pull/79
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:0d25d867-57a2-36c3-b761-40ac6c7a266c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A85E:14FC13:289FB9C:357AE28:696B2A42 |
| html-safe-nonce | e8197884e6ad9fe285c039b0054f63410745b87a2e2e28323d8a2ced76bbec34 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODVFOjE0RkMxMzoyODlGQjlDOjM1N0FFMjg6Njk2QjJBNDIiLCJ2aXNpdG9yX2lkIjoiODcwMzk5ODMzMzc2MTAzODkxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | db9067c1cdd19a127f725337584f7461cdb24655cc66f27569dd2bbb7f5a1922 |
| hovercard-subject-tag | pull_request:2568183511 |
| 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/plotdevice/plotdevice/pull/79/files |
| twitter:image | https://avatars.githubusercontent.com/u/4822251?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/4822251?s=400&v=4 |
| og:image:alt | This PR adds the ability to continuously zoom in and out on the PlotDevice canvas with a trackpad or mouse. It also improves rendering performance by replacing the bitmap-based approach with direct... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/plotdevice/plotdevice git https://github.com/plotdevice/plotdevice.git |
| octolytics-dimension-user_id | 6814325 |
| octolytics-dimension-user_login | plotdevice |
| octolytics-dimension-repository_id | 14907048 |
| octolytics-dimension-repository_nwo | plotdevice/plotdevice |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14907048 |
| octolytics-dimension-repository_network_root_nwo | plotdevice/plotdevice |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width