X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/55ccdb93e4ae4b606a4068cb37492c1ec3ed77a6..aac75444c6e2c1e4b4304debbdf0d600156ca74a:/src/mac/carbon/bitmap.cpp?ds=sidebyside diff --git a/src/mac/carbon/bitmap.cpp b/src/mac/carbon/bitmap.cpp index 4c0a49334f..1b4dca41c7 100644 --- a/src/mac/carbon/bitmap.cpp +++ b/src/mac/carbon/bitmap.cpp @@ -153,6 +153,28 @@ void wxBitmapRefData::Init() m_hasAlpha = false; } +wxBitmapRefData::wxBitmapRefData(const wxBitmapRefData &tocopy) +{ + Init(); + Create(tocopy.m_width, tocopy.m_height, tocopy.m_depth); + + if (tocopy.m_bitmapMask) + m_bitmapMask = new wxMask(*tocopy.m_bitmapMask); + + unsigned char* dest = (unsigned char*)GetRawAccess(); + unsigned char* source = (unsigned char*)tocopy.GetRawAccess(); + size_t numbytes = tocopy.m_width * tocopy.m_height * 4; + + for (size_t i=0; i