]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/dcmemory.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxMemoryDC class
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "dcmemory.h"
16 #include "wx/dcmemory.h"
18 //-----------------------------------------------------------------------------
20 //-----------------------------------------------------------------------------
22 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC
,wxPaintDC
)
24 wxMemoryDC::wxMemoryDC(void)
29 wxMemoryDC::wxMemoryDC( wxDC
*WXUNUSED(dc
) )
34 wxMemoryDC::~wxMemoryDC(void)
38 void wxMemoryDC::SelectObject( const wxBitmap
& bitmap
)
43 wxBitmapRefData
* bmap
= (wxBitmapRefData
*) (m_selected
.GetRefData()) ;
44 if ( bmap
->m_hBitmap
)
46 m_macPort
= (GrafPtr
) bmap
->m_hBitmap
;
49 // SetBackground(wxBrush(*wxWHITE, wxSOLID));
62 void wxMemoryDC::GetSize( int *width
, int *height
) const
66 if (width
) (*width
) = m_selected
.GetWidth();
67 if (height
) (*height
) = m_selected
.GetHeight();
71 if (width
) (*width
) = 0;
72 if (height
) (*height
) = 0;