getMatrix static method
Get a GMatrix instance from the pool. If the pool is empty, a new GMatrix object is created and returned.
Implementation
static GMatrix getMatrix([
double a = 1,
double b = 0,
double c = 0,
double d = 1,
double tx = 0,
double ty = 0,
]) {
if (_matrices.isEmpty) {
return GMatrix(a, b, c, d, tx, ty);
}
return _matrices.removeLast()..setTo(a, b, c, d, tx, ty);
}