Add few tests of retrieving bounding box
New tests of retrieving bounding box coordinates after two consecutive drawing operations, for the case when wxDC coordinates have been changed between the operations and for resetting the bounding box. See #17667.
This commit is contained in:
@@ -100,7 +100,10 @@ private:
|
||||
CPPUNIT_TEST( DrawPolygon );
|
||||
CPPUNIT_TEST( DrawPolyPolygon );
|
||||
CPPUNIT_TEST( DrawRectangle );
|
||||
CPPUNIT_TEST( DrawTwoRectangles );
|
||||
CPPUNIT_TEST( DrawRectsOnTransformedDC );
|
||||
CPPUNIT_TEST( DrawRoundedRectangle );
|
||||
CPPUNIT_TEST( DrawRectangleAndReset );
|
||||
CPPUNIT_TEST( DrawEllipse );
|
||||
CPPUNIT_TEST( Blit );
|
||||
CPPUNIT_TEST( StretchBlit );
|
||||
@@ -125,7 +128,10 @@ private:
|
||||
void DrawPolygon();
|
||||
void DrawPolyPolygon();
|
||||
void DrawRectangle();
|
||||
void DrawTwoRectangles();
|
||||
void DrawRectsOnTransformedDC();
|
||||
void DrawRoundedRectangle();
|
||||
void DrawRectangleAndReset();
|
||||
void DrawEllipse();
|
||||
void Blit();
|
||||
void StretchBlit();
|
||||
@@ -332,3 +338,26 @@ void GCDCBoundingBoxTestCase::DrawCheckMark()
|
||||
m_gcdc->DrawCheckMark(32, 24, 16, 16);
|
||||
AssertBox(32, 24, 16, 16);
|
||||
}
|
||||
|
||||
void GCDCBoundingBoxTestCase::DrawRectangleAndReset()
|
||||
{
|
||||
m_gcdc->DrawRectangle(2, 2, 12, 12);
|
||||
m_gcdc->ResetBoundingBox();
|
||||
AssertBox(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
void GCDCBoundingBoxTestCase::DrawTwoRectangles()
|
||||
{
|
||||
m_gcdc->DrawRectangle(10, 15, 50, 30);
|
||||
m_gcdc->DrawRectangle(15, 20, 55, 35);
|
||||
AssertBox(10, 15, 60, 40);
|
||||
}
|
||||
|
||||
void GCDCBoundingBoxTestCase::DrawRectsOnTransformedDC()
|
||||
{
|
||||
m_gcdc->DrawRectangle(10, 15, 50, 30);
|
||||
m_gcdc->SetDeviceOrigin(15, 20);
|
||||
m_gcdc->DrawRectangle(15, 20, 45, 35);
|
||||
m_gcdc->SetDeviceOrigin(5, 10);
|
||||
AssertBox(5, 5, 65, 60);
|
||||
}
|
||||
|
Reference in New Issue
Block a user