void updateTransforms() { w2dx = viewScale * dpiX / 25.4f; w2dy = viewScale * dpiY / 25.4f; float wdy = ydown ? -w2dy : w2dy; float xc = cxWnd * 0.5f; float yc = cyWnd * 0.5f; matD2W.set(1.f / w2dx, 0, 0, 1.f / wdy, centerW.x - xc / w2dx, centerW.y - yc / wdy); matW2D.set(w2dx, 0, 0, wdy, xc - w2dx * centerW.x, yc - wdy * centerW.y); matD2M = matD2W * matW2M; matM2D = matM2W * matW2D; }