Android Image Drawing (iii) Canvas brush screen problem record _android

Source: Internet
Author: User
When drawing a dynamic diagram in canvas, if a fixed background image is used, only a small sprite is moving!
In this case, you have to redraw the background picture in the frame without frames, making it less efficient! Tried all kinds of methods, and finally failed!
If someone has a good method, can provide a bit, thank you!

Here are some of the ways to share in the process :
1, an article about the picture redraw, but only applies to the Genie in fixed position changes, the background is unchanged!
If you use a moving sprite, it will make the entire screen full of sprites moving pictures, bugs.
Address: Android Surfaceview drawing overlay Refresh and Dirty Rectangle Refresh method

2, about Suffaceview and other knowledge, canvas = Sfh.lockcanvas (), and Sfh.unlockcanvasandpost (canvas), the canvas is constantly drawing up, so you need to overwrite the redraw can!
Reference: Surfaceview,surfaceholder,surfaceholder.callback

3, tried to try the layer method, but Canvas.savelayer () method also do not know what meaning!

4, transparent drawing, also do not know how!
This article is just a note, not a solution ...
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.