// Created: 2003/07/19
// RCS-ID: $Id$
// Copyright: (c) 2003 David Elliott
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
// ========================================================================
// wxBitmapRefData
// ========================================================================
+
class wxBitmapRefData: public wxGDIRefData
{
friend class wxBitmap;
wxMask *m_bitmapMask; // Optional mask
};
-#define M_BITMAPDATA ((wxBitmapRefData *)m_refData)
-
wxBitmapRefData::wxBitmapRefData()
{
m_ok = FALSE;
// ========================================================================
// wxBitmap
// ========================================================================
+
+#define M_BITMAPDATA ((wxBitmapRefData *)m_refData)
+
IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject)
wxBitmap::wxBitmap()
/* TODO: create the bitmap from data */
}
-wxBitmap::wxBitmap(int w, int h, int d)
-{
- (void)Create(w, h, d);
-}
-
wxBitmap::wxBitmap(NSImage* cocoaNSImage)
{
(void) Create(cocoaNSImage);
NSRect imageRect = {{0,0}, [nsimage size]};
imageRect.origin.x = imageRect.size.width * rect.x / GetWidth();
imageRect.origin.y = imageRect.size.height * rect.y / GetHeight();
- imageRect.size.width *= wx_static_cast(CGFloat, rect.width) / GetWidth();
- imageRect.size.height *= wx_static_cast(CGFloat, rect.height) / GetHeight();
+ imageRect.size.width *= static_cast<CGFloat>(rect.width) / GetWidth();
+ imageRect.size.height *= static_cast<CGFloat>(rect.height) / GetHeight();
NSBitmapImageRep *newBitmapRep = [[NSBitmapImageRep alloc] initWithFocusedViewRect:imageRect];
[nsimage unlockFocus];
if([bitmapRep bitsPerPixel]!=bpp)
{
- wxFAIL_MSG( _T("incorrect bitmap type in wxBitmap::GetRawData()") );
+ wxFAIL_MSG( wxT("incorrect bitmap type in wxBitmap::GetRawData()") );
return NULL;
}
data.m_width = [bitmapRep pixelsWide];