]> git.saurik.com Git - wxWidgets.git/commitdiff
adjust subbitmap mask code to new representation
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 21 Jan 2006 12:16:57 +0000 (12:16 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 21 Jan 2006 12:16:57 +0000 (12:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/bitmap.cpp

index ef1de44f2013c5f72dda897ca502bcfbd7d68cd8..9789fa598a07c9bdee9a80efb1753aeced524d96 100644 (file)
@@ -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)