From: Vadim Zeitlin Date: Mon, 28 Apr 2003 02:04:09 +0000 (+0000) Subject: updated to use the new raw bitmap API X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1d2f48b681fb685eb372f171b93f824fc9849e59 updated to use the new raw bitmap API git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/image/image.cpp b/samples/image/image.cpp index 6c96a7505b..c2abf84360 100644 --- a/samples/image/image.cpp +++ b/samples/image/image.cpp @@ -260,7 +260,7 @@ public: { SetClientSize(SIZE, SIZE); - wxRawBitmapData data(m_bitmap); + wxAlphaPixelData data(m_bitmap); if ( !data ) { wxLogError(_T("Failed to gain raw access to bitmap data")); @@ -269,13 +269,13 @@ public: data.UseAlpha(); - wxRawBitmapIterator p(data); + wxAlphaPixelData::Iterator p(data); - p.Offset(BORDER, BORDER); + p.Offset(data, BORDER, BORDER); for ( int y = 0; y < REAL_SIZE; ++y ) { - wxRawBitmapIterator rowStart = p; + wxAlphaPixelData::Iterator rowStart = p; int r = y < REAL_SIZE/3 ? 255 : 0, g = (REAL_SIZE/3 <= y) && (y < 2*(REAL_SIZE/3)) ? 255 : 0, @@ -292,7 +292,7 @@ public: } p = rowStart; - p.OffsetY(1); + p.OffsetY(data, 1); } }