- type which can contain the full pixel value (all channels)
*/
-#ifdef __DIGITALMARS__
template <class Channel,
size_t Bpp, int R, int G, int B, int A = -1,
class Pixel = wxUint32>
-#else
-template <typename Channel,
- size_t Bpp, int R, int G, int B, int A = -1,
- typename Pixel = wxUint32>
-#endif
struct WXDLLEXPORT wxPixelFormat
{
{
m_pRGB += PixelFormat::SizePixel;
if ( m_pAlpha )
- m_pAlpha += PixelFormat::SizePixel;
+ ++m_pAlpha;
return *this;
}
};
};
-#ifdef __DIGITALMARS__
-template <class Image, class PixelFormat = wxPixelFormatFor<Image> >
-class wxPixelData :
- public wxPixelDataOut<Image>:: wxPixelDataIn<PixelFormat>
-{
-public:
- wxPixelData(Image& image)
- : wxPixelDataOut<Image>:: wxPixelDataIn<PixelFormat>(image)
- {
- }
-
- wxPixelData(Image& i, const wxPoint& pt, const wxSize& sz)
- : wxPixelDataOut<Image>:: wxPixelDataIn<PixelFormat>(i, pt, sz)
- {
- }
+#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__
- wxPixelData(Image& i, const wxRect& rect)
- : wxPixelDataOut<Image>:: wxPixelDataIn<PixelFormat>(i, rect)
- {
- }
-};
-#else // not __DIGITALMARS__
template <class Image, class PixelFormat = wxPixelFormatFor<Image> >
class wxPixelData :
public wxPixelDataOut<Image>::template wxPixelDataIn<PixelFormat>
{
public:
- wxPixelData(Image& image)
- : wxPixelDataOut<Image>::template wxPixelDataIn<PixelFormat>(image)
- {
- }
+ typedef
+ typename wxPixelDataOut<Image>::template wxPixelDataIn<PixelFormat>
+ Base;
- wxPixelData(Image& i, const wxPoint& pt, const wxSize& sz)
- : wxPixelDataOut<Image>::template wxPixelDataIn<PixelFormat>(i, pt, sz)
- {
- }
+ wxPixelData(Image& image) : Base(image) { }
- wxPixelData(Image& i, const wxRect& rect)
- : wxPixelDataOut<Image>::template wxPixelDataIn<PixelFormat>(i, rect)
- {
- }
+ wxPixelData(Image& i, const wxRect& rect) : Base(i, rect) { }
+
+ wxPixelData(Image& i, const wxPoint& pt, const wxSize& sz)
+ : Base(i, pt, sz)
+ {
+ }
};
-#endif // __DIGITALMARS__
+
// some "predefined" pixel data classes
typedef wxPixelData<wxImage> wxImagePixelData;
#ifdef __VISUALC__
#pragma warning(default: 4355)
+ #pragma warning(default: 4097)
#endif
#endif // _WX_RAWBMP_H_BASE_