translate method

void translate(
  1. double tx,
  2. double ty
)

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);
}