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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user