@@ -1026,8 +1026,8 @@ wxBitmap wxBitmap::GetSubBitmap(const wxRect &rect) const
|
||||
{
|
||||
int sourcelinesize = GetBitmapData()->GetBytesPerRow() ;
|
||||
int destlinesize = ret.GetBitmapData()->GetBytesPerRow() ;
|
||||
unsigned char *source = sourcedata + int(rect.x * scale * 4 + rect.y *scale * sourcelinesize) ;
|
||||
unsigned char *dest = destdata ;
|
||||
unsigned char* source = sourcedata + size_t(rect.x * scale) * 4 + size_t(rect.y * scale) * sourcelinesize;
|
||||
unsigned char* dest = destdata;
|
||||
|
||||
for (int yy = 0; yy < destheight; ++yy, source += sourcelinesize , dest += destlinesize)
|
||||
{
|
||||
|
Reference in New Issue
Block a user