Scale

Another useful method of Matrix is the setScale method. It takes in two floats representing the amount of scaling to occur on each axis. The first argument is the x-axis scale, and the second is the y-axis scaling. Figure 3-10 shows the result of the following setScale method call.

matrix.setScale(1.5f,1);

Figure 3-10. 1.5 scale applied on the x axis

Was this article helpful?

0 0

Post a comment