Matrix.makeTrans constructor

Matrix.makeTrans(
  1. double dx,
  2. double dy
)

Sets Matrix to translate by (dx, dy). Returned matrix is:

| 1 0 dx |
| 0 1 dy |
| 0 0  1 |

@param dx horizontal translation @param dy vertical translation @return Matrix with translation

Implementation

factory Matrix.makeTrans(double dx, double dy) {
  final m = Matrix.create();
  m.setTranslate(dx, dy);
  return m;
}