mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-10 06:34:01 +00:00
paint: fastTrack should return false for the skew transformations
This commit is contained in:
parent
eff6b3aa6a
commit
12056d516f
2 changed files with 9 additions and 3 deletions
|
@ -53,6 +53,12 @@ static inline bool mathRightAngle(const Matrix* m)
|
|||
}
|
||||
|
||||
|
||||
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) ||
|
||||
|
|
|
@ -38,9 +38,9 @@ static bool _compFastTrack(Paint* cmpTarget, const RenderTransform* pTransform,
|
|||
|
||||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue