+ if ( xxsrc != 0 || yysrc != 0 || bmpwidth != wwsrc || bmpheight != hhsrc )
+ {
+ wwsrc = wxMin( wwsrc , bmpwidth - xxsrc ) ;
+ hhsrc = wxMin( hhsrc , bmpheight - yysrc ) ;
+ if ( wwsrc > 0 && hhsrc > 0 )
+ {
+ if ( xxsrc >= 0 && yysrc >= 0 )
+ {
+ wxRect subrect( xxsrc, yysrc, wwsrc , hhsrc ) ;
+ blit = blit.GetSubBitmap( subrect ) ;
+ }
+ else
+ {
+ // in this case we'd probably have to adjust the different coordinates, but
+ // we have to find out proper contract first
+ blit = wxNullBitmap ;
+ }
+ }
+ else
+ {
+ blit = wxNullBitmap ;
+ }
+ }
+ if ( blit.Ok() )