Change-Id: Ib5e5d6aca3d732963ac9855b0a79e1055dcf3d7c
}
+static inline bool mathSkewed(const Matrix* m)
+{
+ return (fabsf(m->e21 + m->e12) > FLT_EPSILON);
+}
+
+
static inline bool mathIdentity(const Matrix* m)
{
if (!mathEqual(m->e11, 1.0f) || !mathZero(m->e12) || !mathZero(m->e13) ||
if (rTransform) rTransform->update();
- //No rotational.
- if (pTransform && !mathRightAngle(&pTransform->m)) return false;
- if (rTransform && !mathRightAngle(&rTransform->m)) return false;
+ //No rotation and no skewing
+ if (pTransform && (!mathRightAngle(&pTransform->m) || mathSkewed(&pTransform->m))) return false;
+ if (rTransform && (!mathRightAngle(&rTransform->m) || mathSkewed(&rTransform->m))) return false;
//Perpendicular Rectangle?
auto pt1 = pts + 0;