Languages

Menu
Sites
Language
How to expand canvas depending on device...

These days i am coding game application  as a basic canvas size like 480-width and 800-height.

so i have to expand canvas depeding on tizen device..

i wondering how to do this...

 

i had finished this work in Android.

like this..

ScaleX = canvas.getWidth() / 480f;   

ScaleY = canvas.getHeight() / 800f;    

canvas.scale( ScaleX, ScaleY ); 

 

but, i don't know how to do this on Tizen..

Edited by: Kim YoungSu on 01 Dec, 2013

Responses

2 Replies
muditha murthy

Try canvas getbounds API which returns a rectangle of width and height.

Kim YoungSu

Thanks a lot !!