86 if(srcRect.right <=
width && srcRect.bottom <=
height && srcRect.left>=0 && srcRect.top>=0)
88 int srcWidth = srcRect.right - srcRect.left;
89 int srcHeight = srcRect.bottom - srcRect.top;
91 for(
int row = 0; row < srcHeight; row++){
92 unsigned char* destinyBuf =
getBuffer() + (row + srcRect.top) *
rowSpan + (srcRect.left * 4);
93 unsigned char* sourceBuf = srcBuffer + row * srcRowSpan;
94 int sizeBuf = srcWidth * 4;
95 memcpy(destinyBuf, sourceBuf, sizeBuf);