Android Question PageTurnView image fit to canvas

Beja

Expert
Licensed User
Longtime User
Happy New Year!

Is it possible to auto stretch or shrink a bitmap image to fit the canvas.. something like
the Stretch property of VB image control?
Or I must provide the exact size for each device..

Thanks in advance.
 

klaus

Expert
Licensed User
Longtime User
What do you mean with to fit the canvas ?
When you load a bitmap onto a view with Gravity = Gravity.FILL the bitmap fills the view (streched or shrinked).
When you use a canvas to draw a bitmap you set a source rectangle and a destination rectangle if they are different the bitmap is streched or shrinked.
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
Thank you Klaus, I didn't set the destination rectangle correctly.
 
Upvote 0
Top