Matrix
Matrix class holds a 3D matrix for transforming coordinates. It is used for x and y transformation, rotation, scaling and skewing graphic objects.
Example of how to rotate bitmap graphic to 45 degree:
var bitmap = Bitmap.fromFile("app://moscrif.jpg");
var matrix = new Matrix(); app.onDraw = function(sender, canvas)
{
//move bitmap to the midle of screen
//rotate bitmap to 45°
matrix.setTranslate(System.width / 2 - bitmap.width / 2, System.height / 2 - bitmap.height / 2);
matrix.preRotate(45);
//draw rotated bitmap, in onDraw method
canvas.drawBitmapMatrix(bitmap, matrix);
}