From: Stefan Csomor Date: Sat, 21 Jan 2006 12:16:57 +0000 (+0000) Subject: adjust subbitmap mask code to new representation X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d25d7be8a7efcdf7d4eaa69afbaf539b8cbeaf73 adjust subbitmap mask code to new representation git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/bitmap.cpp b/src/mac/carbon/bitmap.cpp index ef1de44f20..9789fa598a 100644 --- a/src/mac/carbon/bitmap.cpp +++ b/src/mac/carbon/bitmap.cpp @@ -945,7 +945,7 @@ wxBitmap wxBitmap::GetSubBitmap(const wxRect &rect) const unsigned char *destdata = (unsigned char * ) maskbuf.GetWriteBuf( maskbufsize ) ; wxASSERT( (source != NULL) && (destdata != NULL) ) ; - source += rect.x + rect.y * sourcelinesize ; + source += rect.x * 3 + rect.y * sourcelinesize ; unsigned char *dest = destdata ; for (int yy = 0; yy < destheight; ++yy, source += sourcelinesize , dest += destlinesize)