Modified parameters in clipping box tests.

Some coordinates of clipping regions given in device coordinates has to be slightly modified to avoid rounding errors in conversions from device to logical coordinates.
This commit is contained in:
Artur Wieczorek
2016-07-16 23:00:30 +02:00
parent 902b9a5c56
commit 874da289ef

View File

@@ -966,7 +966,7 @@ void ClippingBoxTestCaseBase::TwoDevRegionsOverlapping()
// Setting one clipping region in device coordinates
// and next another region in device coordinates (partially overlapping).
// Final clipping box should be an intersection of these two regions.
wxRect r1(30, 40, 40, 30);
wxRect r1(30, 39, 40, 30);
wxRect r2(60, 51, 40, 30);
wxRect r = r1.Intersect(r2);
wxASSERT( !r.IsEmpty() );
@@ -999,7 +999,7 @@ void ClippingBoxTestCaseBase::TwoDevRegionsOverlappingNegDim()
const int h1 = -75;
const int x2 = 20;
const int y2 = 5;
const int y2 = 6;
const int w2 = 40;
const int h2 = 30;
wxClipRect r1(x1, y1, w1, h1);