As pointed out before, Canvas works by recording drawing operations to the next painting frame. To do that, it exposes many methods to allow us to draw various shapes. Let's examine the most common ones:
- drawArc(): Used to draw closed arcs or circle segments
- drawCircle(): Used to draw circles with a determined radius
- drawImage(): Used to draw an image into the Canvas
- drawLine(): Used to draw lines into the Canvas
- drawRect(): Used to draw rectangles into the Canvas
- rotate(): Adds a rotation transformation to the current Canvas transformation
- scale(): Adds a scale transformation to the current canvas transformation
- translate(): Adds a translation to the current canvas transformation
Check out the Canvas class documentation for more ...