From: David Elliott Date: Fri, 10 Dec 2004 01:53:31 +0000 (+0000) Subject: Wrap wxImage specifics in wxUSE_IMAGE and wxBitmap specifics in wxUSE_GUI. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4c683a30212b72e411f70ae80bcab73933b72f19?ds=inline Wrap wxImage specifics in wxUSE_IMAGE and wxBitmap specifics in wxUSE_GUI. This allows the code to be used from wxBase with other image classes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/rawbmp.h b/include/wx/rawbmp.h index 2172b870db..91a29f6f19 100644 --- a/include/wx/rawbmp.h +++ b/include/wx/rawbmp.h @@ -176,6 +176,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 +185,7 @@ struct WXDLLEXPORT wxPixelFormatFor { typedef wxImagePixelFormat Format; }; +#endif //wxUSE_IMAGE // ---------------------------------------------------------------------------- // wxPixelData @@ -271,6 +273,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 +458,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 <> @@ -637,6 +642,7 @@ struct WXDLLEXPORT wxPixelDataOut } }; }; +#endif //wxUSE_GUI #ifdef __VISUALC__ // typedef-name 'foo' used as synonym for class-name 'bar' @@ -667,9 +673,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