Relax the clip box check in OneDevRegionRTL test case

Due to rounding errors, this test would fail under wxMSW if the region started
at x=2*n, and would fail under wxQt if it started at x=2*n+1. So relax the check
by using 1 as a position tolerance.
This commit is contained in:
ali kettab
2025-10-28 22:46:37 +01:00
parent 55f54331c9
commit 553aa06e39

View File

@@ -1063,13 +1063,13 @@ static void OneDevRegionRTL(wxDC& dc, const wxBitmap& bmp, bool useTransformMatr
wxPoint pos = dc.DeviceToLogical(x, y);
wxSize dim = dc.DeviceToLogicalRel(w, h);
#else
wxPoint pos = dc.DeviceToLogical((s_dcSize.x-1)-x, y);
wxPoint pos = dc.DeviceToLogical(s_dcSize.x-x, y);
wxSize dim = dc.DeviceToLogicalRel(-w, h);
#endif
CheckClipBox(dc, bmp,
pos.x, pos.y, dim.x, dim.y,
x2, y, w, h);
x2, y, w, h, 1 /*posTolerance*/);
}
static void OneLargeDevRegion(wxDC& dc, const wxBitmap& bmp, bool checkExtCoords, bool useTransformMatrix, const wxPoint& parentDcOrigin)