-
Notifications
You must be signed in to change notification settings - Fork 525
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
Fix the what the IgnorePixelScaling
property works
#1804
Conversation
IgnorePixelScaling
property worksIgnorePixelScaling
property works
Hi, this PR meet the our requirements except one thing We hope to able to update ScalingFactor
Because, in several reasons, we need to support a virtual scaling factor. Could you make a setter on ScalingInfo.ScalingFactor? |
@myroot I can do that. Do we need to have different scaling factors on different canvases? Or can it all be in one place? For now I will add a setter to the Do you have an example of when you would want the scaling to be different to the screen DPI? |
public static void SetScalingFactor(double? scalingFactor) | ||
{ | ||
scalingFactorOverride = scalingFactor; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this as a separate method so it can be a null that can allow for reverting back to the system value.
Is this useful in this global context? Should it be on the individual canvas views?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good, We apply custom scale as globally, so It works for tizen.
Here is a code of setting custom scaling factor on tizen. if this PR was merged, I will add code to call |
@mattleibow I just stumbled over this and how the |
Description of Change
Previously the
IgnorePixelScaling
allowed the drawing code to work in density-independent UI units, however it did so in a poor manner. Instead of scaling the canvas in such a way that it preserved the high density, it stretched and reduced the quality of the image.This PR makes sure to always draw in high resolution, and then pre-scale the canvas before invoking the paint events.
Bugs Fixed
API Changes
None.
Behavioral Changes
A demo of the change.
PR Checklist