Transformation

translate(x,y) further translates the canvas drawing.

rotate(rad) further rotates about the top-left corner.

scale(scalewidth,scaleheight) further scales the drawing. The values are in the range [0.0,1.0].

transform(a,b,c,d,e,f) multiplies the current transformation matrix with a custom matrix.

setTransform(a,b,c,d,e,f) resets the current transformation matrix to the identity matrix, and then runs transform() with the same arguments.