mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-03-23 18:54:01 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user