6.3.8. Drawing Graphics Using Paint and Canvas
We use methods of class Canvas (package android.graphics
) to draw text, lines and circles. Canvas
methods draw on a View
’s Bitmap. Each drawing method in class Canvas
uses an object of class Paint (package android.graphics
) to specify drawing characteristics, including color, line thickness, font size and more. These capabilities are presented with the drawGameElements
method in Section 6.8. For more details on the drawing characteristics you can specify with a Paint
object, visit
Get Android™ How to Program, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.