Java – stretch / shrink canvas

I'm making an Android game. I test my application on galaxy SII. I've made great progress. Unfortunately, I ignore testing it for other devices. I know I will encounter different resolutions of different types of devices. But I think I can deal with it by arranging my coordinate values. But now I think it's a very difficult task. I can't go back to the starting point, Because I wrote a lot of code

My question is, is there any way to stretch / shrink my canvas to other resolutions, even though I give 800 × 480?

P. S.: my canvas is canvas = holder. Lockcanvas(); In my post

thank you

resolvent:

I'm not fully qualified for this, but you should be able to perform matrix transformation on canvas. See if this similar question will provide a starting point. In addition, please read this on Wikipedia

Editor: now I think that this may put the object or part of the object off the screen or introduce a perspective problem

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>