translate method
Translates the current transformation matrix by the given offsets.
tx
: The translation amount along the x-axis.ty
: The translation amount along the y-axis.
Implementation
void translate(double tx, double ty) {
transform(1.0, 0.0, 0.0, 1.0, tx, ty);
}