The bitmap holds the actual pixel data of the image. Whereas the Canvas class provides a high level interface to draw shapes, paths, text, and so on, the Bitmap class provides a more low-level interface to the image, allowing you to manipulate the pixels directly.

Xfermode

Xfermode is the base class for objects that are called to implement custom “transfer-modes” in the drawing pipeline. 通过修改Paint的Xfermode来影响在Canvas已有的图像上面绘制新的颜色的方式 : 在已有的图像上绘图将会在其上面添加一层新的形状。如果新的Paint是完全不透明的，那么它将完全遮挡住下面的Paint；如果它是部分透明的，那么它将会被染上下面的颜色。