Y-Directed Shift Matrix and Equivalence
Compression cannot be built using only rotation and scaling.
Slice is an affine transform, while rotation and scaling are "hard" transforms that are less expressive.
more on this:
http://en.wikipedia.org/wiki/Affine_transformation
a source to share
Perhaps it can be done by rotating followed by uneven scaling and reverse rotation. Details can be found here in the third question http://www.cs.cmu.edu/~djames/15-462/Fall03/assts/15-462-Fall03-wrAssign1-answer.pdf . you can also try the following openGL code. It rotates the rectangle 45 degrees, then scales along the x-axis. and then rotates at -26 degrees, i.e. atan (0.5). 0.5 comes from finding the angle between the x-axis and one side after scaling along the x-axis.
glRotatef (-26.0, 0.0, 0.0, 1.0);
glScalef (2,1,1);
glRotatef (45.0, 0.0, 0.0, 1.0);
glRectf (0, 0, 25.0, 25.0);
a source to share