X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3103e8a97e834e9793f0eb149aa82a99fd64ef9a..67193066b2d16ca36529216f70d093690d7e1123:/src/mac/classic/bitmap.cpp diff --git a/src/mac/classic/bitmap.cpp b/src/mac/classic/bitmap.cpp index 291e4be8cb..54cc8bba01 100644 --- a/src/mac/classic/bitmap.cpp +++ b/src/mac/classic/bitmap.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: bitmap.cpp +// Name: src/mac/classic/bitmap.cpp // Purpose: wxBitmap // Author: Stefan Csomor // Modified by: @@ -9,15 +9,19 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "bitmap.h" -#endif +#include "wx/wxprec.h" -#include "wx/defs.h" +#ifdef __BORLANDC__ + #pragma hdrstop +#endif #include "wx/bitmap.h" -#include "wx/icon.h" -#include "wx/log.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/icon.h" +#endif + #include "wx/image.h" #include "wx/xpmdecod.h" @@ -357,7 +361,7 @@ wxBitmapRefData::wxBitmapRefData() : m_width(0) , m_height(0) , m_depth(0) - , m_ok(FALSE) + , m_ok(false) , m_numColors(0) , m_quality(0) { @@ -512,12 +516,12 @@ wxBitmap::wxBitmap(const wxString& filename, wxBitmapType type) bool wxBitmap::CreateFromXpm(const char **bits) { - wxCHECK_MSG( bits != NULL, FALSE, wxT("invalid bitmap data") ) + wxCHECK_MSG( bits != NULL, false, wxT("invalid bitmap data") ); wxXPMDecoder decoder; wxImage img = decoder.ReadData(bits); - wxCHECK_MSG( img.Ok(), FALSE, wxT("invalid bitmap data") ) + wxCHECK_MSG( img.Ok(), false, wxT("invalid bitmap data") ); *this = wxBitmap(img); - return TRUE; + return true; } wxBitmap::wxBitmap(const char **bits) @@ -714,7 +718,7 @@ bool wxBitmap::Create(void *data, wxBitmapType type, int width, int height, int if ( handler == NULL ) { wxLogWarning(wxT("no bitmap handler for type %d defined."), type); - return FALSE; + return false; } return handler->Create(this, data, type, width, height, depth); @@ -722,8 +726,8 @@ bool wxBitmap::Create(void *data, wxBitmapType type, int width, int height, int wxBitmap::wxBitmap(const wxImage& image, int depth) { - wxCHECK_RET( image.Ok(), wxT("invalid image") ) - wxCHECK_RET( depth == -1, wxT("invalid bitmap depth") ) + wxCHECK_RET( image.Ok(), wxT("invalid image") ); + wxCHECK_RET( depth == -1, wxT("invalid bitmap depth") ); m_refData = new wxBitmapRefData(); @@ -1166,7 +1170,7 @@ bool wxMask::Create(const wxBitmap& bitmap) UnlockPixels( GetGWorldPixMap( (GWorldPtr) m_maskBitmap) ); UnlockPixels( GetGWorldPixMap( (GWorldPtr) bitmap.GetHBITMAP()) ); - return FALSE; + return false; } // Create a mask from a bitmap and a palette index indicating @@ -1175,7 +1179,7 @@ bool wxMask::Create(const wxBitmap& bitmap, int paletteIndex) { // TODO wxCHECK_MSG( 0, false, wxT("wxMask::Create not yet implemented")); - return FALSE; + return false; } // Create a mask from a bitmap and a colour indicating @@ -1230,7 +1234,7 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) UnlockPixels( GetGWorldPixMap( (GWorldPtr) bitmap.GetHBITMAP() ) ) ; SetGWorld( origPort , origDevice ) ; - return TRUE; + return true; } bool wxMask::PointMasked(int x, int y) @@ -1264,18 +1268,18 @@ wxBitmapHandler::~wxBitmapHandler() bool wxBitmapHandler::Create(wxBitmap *bitmap, void *data, long type, int width, int height, int depth) { - return FALSE; + return false; } bool wxBitmapHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags, int desiredWidth, int desiredHeight) { - return FALSE; + return false; } bool wxBitmapHandler::SaveFile(const wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette) { - return FALSE; + return false; } /* @@ -1321,9 +1325,9 @@ bool wxPICTResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, lo M_BITMAPHANDLERDATA->m_numColors = theInfo.uniqueColors ; // M_BITMAPHANDLERDATA->m_bitmapPalette; // M_BITMAPHANDLERDATA->m_quality; - return TRUE ; + return true ; } - return FALSE ; + return false ; } void wxBitmap::InitStandardHandlers() @@ -1433,4 +1437,3 @@ void wxBitmap::UseAlpha() // mask in UngetRawData() M_BITMAPDATA->m_hasAlpha = true; } -