X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f0fc6958065fc93b8a2d7c8d51d23f7e69bffbdd..3964e424bf6b70e43b7cf53ef41d279e4da5c037:/include/wx/rawbmp.h diff --git a/include/wx/rawbmp.h b/include/wx/rawbmp.h index b7f3b01c30..dbdddcee3f 100644 --- a/include/wx/rawbmp.h +++ b/include/wx/rawbmp.h @@ -144,11 +144,13 @@ typedef wxPixelFormat wxImagePixelFormat; // the (most common) native bitmap format without alpha support typedef wxPixelFormat wxNativePixelFormat; // the (most common) native format for bitmaps with alpha channel @@ -156,7 +158,14 @@ typedef wxPixelFormat wxAlphaPixelFormat; + #if defined(__WXMSW__) + 3 + #elif defined(__WXMAC__) + 0 + #else // default for the others (not supported anyhow) + 3 + #endif // platform + > wxAlphaPixelFormat; // we also define the (default/best) pixel format for the given class: this is // used as default value for the pixel format in wxPixelIterator template @@ -322,7 +331,7 @@ struct WXDLLEXPORT wxPixelDataOut { m_pRGB += PixelFormat::SizePixel; if ( m_pAlpha ) - m_pAlpha += PixelFormat::SizePixel; + ++m_pAlpha; return *this; } @@ -623,26 +632,31 @@ struct WXDLLEXPORT wxPixelDataOut }; }; +#ifdef __VISUALC__ + // typedef-name 'foo' used as synonym for class-name 'bar' + // (VC++ gives this warning each time wxPixelData::Base is used but it + // doesn't make any sense here -- what's wrong with using typedef instead + // of class, this is what it is here for!) + #pragma warning(disable: 4097) +#endif // __VISUALC__ template > class wxPixelData : - public wxPixelDataOut::wxPixelDataIn + public wxPixelDataOut::template wxPixelDataIn { public: - wxPixelData(Image& image) - : wxPixelDataOut::wxPixelDataIn(image) - { - } + typedef + typename wxPixelDataOut::template wxPixelDataIn + Base; - wxPixelData(Image& i, const wxPoint& pt, const wxSize& sz) - : wxPixelDataOut::wxPixelDataIn(i, pt, sz) - { - } + wxPixelData(Image& image) : Base(image) { } - wxPixelData(Image& i, const wxRect& rect) - : wxPixelDataOut::wxPixelDataIn(i, rect) - { - } + wxPixelData(Image& i, const wxRect& rect) : Base(i, rect) { } + + wxPixelData(Image& i, const wxPoint& pt, const wxSize& sz) + : Base(i, pt, sz) + { + } }; @@ -674,6 +688,7 @@ struct WXDLLEXPORT wxPixelIterator : wxPixelData::Iterator #ifdef __VISUALC__ #pragma warning(default: 4355) + #pragma warning(default: 4097) #endif #endif // _WX_RAWBMP_H_BASE_