Working with 2D graphics

Here is the 2D graphics api docs

android stroke color fill color 2D graphics

Search for: android stroke color fill color 2D graphics

Here is a good example using even a viewgroup: java2s


paint.setStyle(Paint.Style...)
FILL
FILL_AND_STROKE
STROKE

These calls saves and restores the transformation matrix that is available on the canvas. A save is like a save checkpoint. Your intention is to do a lot of transformations and then go back to that check point.