Can a matrix be used when drawing lines and paths on android?
the DrawBitmap mathod takes a matrix as argument, I cannot find anything similar when drawing lines.
The Android Canvas drawBitmap method uses the matrix to transform the image as it is drawn. See this URL for the details: "http://developer.android.com/reference/android/graphics/Canvas.html#drawBitmap(android.graphics.Bitmap, android.graphics.Matrix, android.graphics.Paint)" [sorry, the link is breaking at the commas, cut-n-paste url]
There are several drawLine methods on the Canvas object, but none take a matrix as a parameter. See "http://developer.android.com/reference/android/graphics/Canvas.html#drawLine(float, float, float, float, android.graphics.Paint)" [sorry, the link is breaking at the commas, cut-n-paste url]
Your best bet is to use one of the Canvas's rotate, skew, and translate methods. See http://developer.android.com/reference/android/graphics/Canvas.html
I finally figured out how to use a matrix to do transformation on lines in Android.
It's a little roundabout but hope it helps someone.
The following code is to rotate a line around it's center.
Hope this helps.