X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4b7ded8bad3a45ea4838e6d3f5d1957a134050ec..324eeecb3cdc9522e136af6670443148772b412a:/include/wx/rawbmp.h diff --git a/include/wx/rawbmp.h b/include/wx/rawbmp.h index e2998760e1..0815f09f17 100644 --- a/include/wx/rawbmp.h +++ b/include/wx/rawbmp.h @@ -160,6 +160,11 @@ typedef wxPixelFormat wxImagePixelFormat; // Cocoa is standard RGB or RGBA (normally it is RGBA) typedef wxPixelFormat wxNativePixelFormat; + #define wxPIXEL_FORMAT_ALPHA 3 +#elif defined(__WXGTK__) + // Under GTK+ 2.X we use GdkPixbuf, which should be RGBA + typedef wxPixelFormat wxNativePixelFormat; + #define wxPIXEL_FORMAT_ALPHA 3 #endif @@ -176,6 +181,7 @@ typedef wxPixelFormat wxImagePixelFormat; // used as default value for the pixel format in wxPixelIterator template template struct wxPixelFormatFor; +#if wxUSE_IMAGE // wxPixelFormatFor is only defined for wxImage, attempt to use it with other // classes (wxBitmap...) will result in compile errors which is exactly what we // want @@ -184,6 +190,7 @@ struct WXDLLEXPORT wxPixelFormatFor { typedef wxImagePixelFormat Format; }; +#endif //wxUSE_IMAGE // ---------------------------------------------------------------------------- // wxPixelData @@ -271,6 +278,7 @@ struct WXDLLEXPORT wxPixelDataOut }; }; +#if wxUSE_IMAGE // wxPixelData specialization for wxImage: this is the simplest case as we // don't have to care about different pixel formats here template <> @@ -455,7 +463,9 @@ struct WXDLLEXPORT wxPixelDataOut Iterator m_pixels; }; }; +#endif //wxUSE_IMAGE +#if wxUSE_GUI // wxPixelData specialization for wxBitmap: here things are more interesting as // we also have to support different pixel formats template <> @@ -468,7 +478,7 @@ struct WXDLLEXPORT wxPixelDataOut // the type of the class we're working with typedef wxBitmap ImageType; - class Iterator + class WXDLLEXPORT Iterator { public: // the pixel format we use @@ -637,6 +647,7 @@ struct WXDLLEXPORT wxPixelDataOut } }; }; +#endif //wxUSE_GUI #ifdef __VISUALC__ // typedef-name 'foo' used as synonym for class-name 'bar' @@ -667,9 +678,13 @@ public: // some "predefined" pixel data classes +#if wxUSE_IMAGE typedef wxPixelData wxImagePixelData; +#endif //wxUSE_IMAGE +#if wxUSE_GUI typedef wxPixelData wxNativePixelData; typedef wxPixelData wxAlphaPixelData; +#endif //wxUSE_GUI // ---------------------------------------------------------------------------- // wxPixelIterator