- dc.DrawText( _T("SubBitmap"), 170, 2230 );
- wxBitmap sub = to_blit.GetSubBitmap( wxRect(0,0,15,15) );
- dc.DrawBitmap( sub, 170, 2250, TRUE );
-
- dc.DrawText( _T("Enlarged"), 250, 2230 );
- dc.SetUserScale( 1.5, 1.5 );
- dc.DrawBitmap( to_blit, (int)(250/1.5), (int)(2250/1.5), TRUE );
- dc.SetUserScale( 2, 2 );
- dc.DrawBitmap( to_blit, (int)(300/2), (int)(2250/2), TRUE );
- dc.SetUserScale( 1.0, 1.0 );
-
- dc.DrawText( _T("Blit"), 400, 2230);
- wxMemoryDC blit_dc;
- blit_dc.SelectObject( to_blit );
- dc.Blit( 400, 2250, to_blit.GetWidth(), to_blit.GetHeight(), &blit_dc, 0, 0, wxCOPY, TRUE );
- dc.SetUserScale( 1.5, 1.5 );
- dc.Blit( (int)(450/1.5), (int)(2250/1.5), to_blit.GetWidth(), to_blit.GetHeight(), &blit_dc, 0, 0, wxCOPY, TRUE );
- dc.SetUserScale( 2, 2 );
- dc.Blit( (int)(500/2), (int)(2250/2), to_blit.GetWidth(), to_blit.GetHeight(), &blit_dc, 0, 0, wxCOPY, TRUE );
- dc.SetUserScale( 1.0, 1.0 );
+ // testing icon -> bitmap conversion
+ wxBitmap to_blit( m_iconSmileXpm );
+ if (to_blit.Ok())
+ {
+ dc.DrawText( _T("SubBitmap"), 170, 2230 );
+ wxBitmap sub = to_blit.GetSubBitmap( wxRect(0,0,15,15) );
+ if (sub.Ok())
+ dc.DrawBitmap( sub, 170, 2250, true );
+
+ dc.DrawText( _T("Enlarged"), 250, 2230 );
+ dc.SetUserScale( 1.5, 1.5 );
+ dc.DrawBitmap( to_blit, (int)(250/1.5), (int)(2250/1.5), true );
+ dc.SetUserScale( 2, 2 );
+ dc.DrawBitmap( to_blit, (int)(300/2), (int)(2250/2), true );
+ dc.SetUserScale( 1.0, 1.0 );
+
+ dc.DrawText( _T("Blit"), 400, 2230);
+ wxMemoryDC blit_dc;
+ blit_dc.SelectObject( to_blit );
+ dc.Blit( 400, 2250, to_blit.GetWidth(), to_blit.GetHeight(), &blit_dc, 0, 0, wxCOPY, true );
+ dc.SetUserScale( 1.5, 1.5 );
+ dc.Blit( (int)(450/1.5), (int)(2250/1.5), to_blit.GetWidth(), to_blit.GetHeight(), &blit_dc, 0, 0, wxCOPY, true );
+ dc.SetUserScale( 2, 2 );
+ dc.Blit( (int)(500/2), (int)(2250/2), to_blit.GetWidth(), to_blit.GetHeight(), &blit_dc, 0, 0, wxCOPY, true );
+ dc.SetUserScale( 1.0, 1.0 );
+ }