简体   繁体   中英

Issue with background image when outputting to emulator

Image below shows the output of my game. However as can be seen the background image only takes up half of the screen. Code used for the canvas.drawbitmap also provided, which I believe is to be changed when scaling the image. Any help would be appreciated.

canvas.drawBitmap(backgroundImage, 0, 0, null);

Output image of background in game

So what I did was simply change the background image. Did this through a PNG image found online. Looked at the dimensions the image was, found an image already with greater dimensions which took the entire background image.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM