Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/2d/AutoPolygon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,6 @@ Vec2 AutoPolygon::findFirstNoneTransparentPixel(const Rect& rect, float threshol
Vec2 i;
for (i.y = rect.origin.y; i.y < rect.origin.y + rect.size.height; i.y++)
{
if (found)
break;
for (i.x = rect.origin.x; i.x < rect.origin.x + rect.size.width; i.x++)
{
auto alpha = getAlphaByPos(i);
Expand All @@ -213,6 +211,8 @@ Vec2 AutoPolygon::findFirstNoneTransparentPixel(const Rect& rect, float threshol
break;
}
}
if (found)
break;
}
AXASSERT(found, "image is all transparent!");
return i;
Expand Down