applyMatrix for 2d sketch?

How would I apply a custom transformation to a 2d sketch?

The following code will skew a rectangle, but requires the 3d renderer.

pushMatrix( );

applyMatrix( 1, tan( radians(45) ), 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
);

fill( 255, 0, 0 );
rect( 0, 0, 50, 50 );
popMatrix( );

How do I apply a similar 2d matrix (1, tan(radians(45)), 0, 0, 1, 0, 0, 0, 1) to a 2d sketch?

Tagged:

Answers

Sign In or Register to comment.