Fix building tests with wxUSE_GRAPHICS_CONTEXT==0

Don't execute code which depends on graphics context functions if wxUSE_GRAPHICS_CONTEXT==0.
This commit is contained in:
Artur Wieczorek
2017-04-09 21:01:45 +02:00
parent 2132ff0291
commit ee4ab34686
2 changed files with 7 additions and 1 deletions

View File

@@ -396,9 +396,11 @@ void TransformMatrixTestCaseDCBase::VMirrorAndTranslate()
// is affected by the transformation. In this case mirrored bitmap
// needs to be shifthed by dim pixels.
int ty;
#if wxUSE_GRAPHICS_CONTEXT
if ( m_dc->GetGraphicsContext() )
ty = m_bmpOrig.GetHeight();
else
#endif // wxUSE_GRAPHICS_CONTEXT
ty = m_bmpOrig.GetHeight() - 1;
matrix.Translate(0, -ty);
m_dc->SetTransformMatrix(matrix);