Use wxMemoryDC with selected wxBitmap to create wxGraphicsContext in the graphics test.

If there is no wxBitmap selected into wxMemoryDC which is passed to wxGraphicsContext then there is raised an assertion warning (harmless in this context but caught and reported by CppUnit). To suppress this message we need to select any bitmap into wxMemoryDC prior to creating a wxGraphicsContext.
This commit is contained in:
Artur Wieczorek
2016-06-29 20:54:02 +02:00
parent eb7a9f85c5
commit 9bf97bd607

View File

@@ -193,7 +193,8 @@ void AffineTransformTestCase::CompareToGraphicsContext()
// Create graphics matrix and transform it
wxMemoryDC mDc;
wxBitmap bmp(10, 10);
wxMemoryDC mDc(bmp);
wxGraphicsContext* gDc = wxGraphicsContext::Create(mDc);
wxGraphicsMatrix matrixG1 = gDc->CreateMatrix();
wxGraphicsMatrix matrixG2 = gDc->CreateMatrix();