mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Fix bug 79426
This commit is contained in:
@ -1007,16 +1007,18 @@ namespace Aggplus
|
|||||||
bool CGraphicsPath::operator==(const CGraphicsPath& other) noexcept
|
bool CGraphicsPath::operator==(const CGraphicsPath& other) noexcept
|
||||||
{
|
{
|
||||||
unsigned pointsCount = GetPointCount(),
|
unsigned pointsCount = GetPointCount(),
|
||||||
otherPointsCount = other.GetPointCount();
|
otherPointsCount = other.GetPointCount();
|
||||||
|
|
||||||
if (pointsCount != otherPointsCount)
|
if (pointsCount != otherPointsCount)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
std::vector<PointD> points = GetPoints(0, pointsCount),
|
std::vector<PointD> points = GetPoints(0, pointsCount),
|
||||||
otherPoints = other.GetPoints(0, otherPointsCount);
|
otherPoints = other.GetPoints(0, otherPointsCount);
|
||||||
|
|
||||||
|
bool reverse = IsClockwise() ^ other.IsClockwise();
|
||||||
|
|
||||||
for (unsigned i = 0; i < pointsCount; i++)
|
for (unsigned i = 0; i < pointsCount; i++)
|
||||||
if (!points[i].Equals(otherPoints[i]))
|
if (!points[i].Equals(otherPoints[reverse ? pointsCount - i - 1 : i]))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user