From b5f04ec8597c8933cab18067d6d63bee0101ee53 Mon Sep 17 00:00:00 2001 From: aismann Date: Fri, 10 Oct 2025 07:35:45 +0200 Subject: [PATCH] AutoPolygon::findFirstNoneTransparentPixel() detected Y pos is 1 pixel to much. --- core/2d/AutoPolygon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/2d/AutoPolygon.cpp b/core/2d/AutoPolygon.cpp index a77ae4a20ca3..fae9e6717dba 100644 --- a/core/2d/AutoPolygon.cpp +++ b/core/2d/AutoPolygon.cpp @@ -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); @@ -213,6 +211,8 @@ Vec2 AutoPolygon::findFirstNoneTransparentPixel(const Rect& rect, float threshol break; } } + if (found) + break; } AXASSERT(found, "image is all transparent!"); return i;