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

AF-180: Account for Device Pixel Ratio when Rendering Graphics #107

Merged
merged 1 commit into from
Aug 30, 2023

Conversation

mikecarenzo
Copy link
Contributor

Overview

Sharpens graphics on monitors with high pixel density (like Apple Retina displays).

Shaper Graphics

This PR updates BlockDiagram so that it accounts for the device's current pixel ratio.

This PR also introduces the "dppx-change" event to the Browser utility class. Now, developers can subscribe to changes to the device's pixel ratio. (This usually occurs when dragging the browser to and from monitors with different pixel densities.) This new event is used by BlockDiagram to re-render the chart in such cases.

@mikecarenzo mikecarenzo self-assigned this Aug 29, 2023
@sonarcloud
Copy link

sonarcloud bot commented Aug 29, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@mehaase mehaase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I compared rendering in the 2.0 builder side-by-side with this branch and the difference is amazing!

I don't have any low dpi screens to test switching back and forth, nor do i understand most of the canvas magic that makes this work, but this is a huge improvement. Thanks.

@mikecarenzo mikecarenzo merged commit ceb448a into main Aug 30, 2023
4 of 6 checks passed
@mikecarenzo mikecarenzo deleted the AF-180_account_for_device_pixel_ratio branch August 30, 2023 14:40
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.

None yet

2 participants