Paint is an important class for drawing text and graphics in the Android API, which is located in the Android.graphics package, which appears early in the class. The use of paint,paint similar to JavaScript is also inseparable from canvas.
Paint is not really a "brush", the actual "painting" is the bottom layer, the graphics package under the paint is not visible, the paint encapsulates the various parameters of the painting.
Initializes the paint, which can be passed directly through the default constructor
Paint Mpaint = new paint ();
- Settextsize (): If you want to draw text, you generally need to set the font size, or the default drawing 12px, the method determines the width of two lowercase ' x ' letters.
- SetColor (int color): Pass in a hexadecimal color parameter to set the color of the ARGB
- Setantalias (Boolean): Set whether anti-aliasing
Some notes on how to use paint in Android