Skew problem

Hello!

I need skew a CCSprite for x and y, but when i do it, result looking strange.

For example, code:

CCSprite* pSprite = ... pSprite->setSkewX(90); pSprite->setSkewY(90);

How i understand a skew, this code equal for pSprite->setRotation(90)
But instead i seeing a strongly scaled sprite.
I’m wrong?

I think you misunderstood what a skew is. It is like making a square a parallelogram

Right, a skew making a square a parallelogram.
But when i make skew for x and y at one time for one value (45 degrees, for example), it must be equal to set rotation for that degree, isn’t it? In Flash it that.

The values are by pixels, not angle

A code from CCNode.h:

/** The X skew angle of the node in degrees. This angle describes the shear distortion in the X direction. Thus, it is the angle between the Y axis and the left edge of the shape The default skewX angle is 0. Positive values distort the node in a CW direction. */ CC_PROPERTY(float, m_fSkewX, SkewX)

The skew value in degrees.