The relationship between Drawable, Bitmap, Canvas, and painting should be known for Android development.
First, let's understand that the display class in the Android platform is View, but it also provides the underlying graphics class android. graphics. What we call today is the underlying graphic interface of graphics.
Bitmap is called a Bitmap. Generally, the format of a Bitmap file is suffixed with bmp. Of course, there are many encoders such as RGB565 and RGB888. As a pixel-by-pixel Display object, the execution efficiency is high, but the disadvantage is also obvious low storage efficiency. It is better to understand it as a storage object.
Drawable-as a common image object in Android, it can load images in common formats, such as GIF, PNG, and JPG. Of course, it also supports BMP. Of course, it also provides some advanced visualization objects, such as gradient and graphics.
Canvas-the name of the Canvas can be seen as a processing process. You can use various methods to manage Bitmap, GL, or Path paths, at the same time, it can work with the Matrix class to perform image rotation, scaling, and other operations, while the Canvas class also provides operations such as cropping and selecting.
Paint-we can regard it as a drawing tool, such as a Paint brush or Paint brush. He manages the fonts, colors, and styles of each drawing tool.
If Android game development and display effects are involved, you can use these underlying graphics classes to efficiently implement your own applications.