zoomAroundPoint method
Simple utility to zoom by zoomFactor
around the point center
that
returns the new matrix.
Implementation
GMatrix zoomAroundPoint(GPoint center, double zoomFactor) {
var t1 = GMatrix();
t1.translate(-center.x, -center.y);
var sc = GMatrix();
sc.scale(zoomFactor, zoomFactor);
var t2 = GMatrix();
t2.translate(center.x, center.y);
var zoom = GMatrix();
zoom.concat(t1).concat(sc).concat(t2);
return concat(zoom);
}