SkMatrix matrix; matrix.setScale(2.0f, 2.0f); canvas->drawBitmap(bitmap, matrix, nullptr);
SkMatrix matrix; matrix.setRotate(45.0f); canvas->drawRect(rect, paint, matrix);This code creates a rotation matrix that rotates a rectangle by 45 degrees and applies it to the canvas using the `drawRect` function. These examples show how SkMatrix can be used to apply transformations to graphics. The package library for SkMatrix is Skia Graphics Engine, a powerful open-source library that provides tools for creating high-quality 2D and 3D graphics.