void uiDrawMatrixSkew(uiDrawMatrix *m, double x, double y, double xamount, double yamount) { BAffineTransform a; m2a(m, &a); // TODO degrees or radians? a.ShearBy(BPoint(x, y), BPoint(xamount, yamount)); a2m(&a, m); }
const BAffineTransform& BAffineTransform::SetScale(double x, double y) { double tx; double ty; double rotation; double shearX; double shearY; if (!GetAffineParameters(&tx, &ty, &rotation, NULL, NULL, &shearX, &shearY)) { return *this; } BAffineTransform result; result.ShearBy(shearX, shearY); result.ScaleBy(x, y); result.RotateBy(rotation); result.TranslateBy(tx, ty); return *this = result; }