#include#include "SkMatrix.h" int main() { SkMatrix matrix; matrix.setSkewY(0.5); // y-skew of 0.5 radians // apply matrix transform to point SkPoint point = {100, 50}; matrix.mapPoints(&point, 1); std::cout << "Transformed point: (" << point.fX << ", " << point.fY << ")" << std::endl; return 0; }
#includeIn this example, an SkMatrix object is first scaled in the x and y directions. Then, a y-skew of 0.5 radians is added to the matrix. The getSkewY() method is called to retrieve the y-skew value.#include "SkMatrix.h" int main() { SkMatrix matrix; matrix.setScale(2, 3); // scale matrix by 2x in x-axis and 3x in y-axis matrix.skew(0, 0.5); // apply x-skew of 0 radians and y-skew of 0.5 radians std::cout << "y-skew: " << matrix.getSkewY() << std::endl; return 0; }