AutoScale for Canvas drawings

gjoisa

Active Member
Licensed User
Longtime User
Works fine autoscale method in views which added with designer . My app having 10 layouts having canvases . To get displayed canvas drawings accordingly in all screen sizes is there any easy methods ? I tried using dip . But no success . Help .
 

JonPM

Well-Known Member
Licensed User
Longtime User
I haven't used autscale yet, but I believe autoscale only works with views added in designer
 
Upvote 0

Olaan

Expert
Licensed User
Longtime User
How to calculate a scale factor

You must calculate a scale factor on your own and apply it to all the coordinates.

Best regards.

Hi Klaus,
Please demo how to calculate a scale factor. I don't know. Why is AutoScaleRate(0.9) or AutoScaleRate(0.5) ? Where are them come from?

Best Regards
Theera
:eek:
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
For AutoScaleRate look here.
Calculating a scale factor for canvas depends on what you want to do.
If you want to adapt it to AutoScale you can calculate the scale factor with the equations given in the link above.

AutoScaleRate(0.9) or AutoScaleRate(0.5)? Where are them come from?
From testing with different Rate values.
Rate = 0 no scaling
Rate = 1 almost similar as %x / %y scaling.

Best regards.
 
Last edited:
Upvote 0

gjoisa

Active Member
Licensed User
Longtime User
The problem with me is I am having one device for test . I realize the problem when an customer brings a new device with different screen size (eg : 10 inch tablet ) . Then I have to re design the every screen ( My app having 12 screens) . When ever I adjust the layout for a screen size , In another screen size it does not look accordingly . My only request is , Please share an example with designer views and coded views (like canvas ) for the autoscale concept .:BangHead:
 
Upvote 0
Top