]>
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
;
47 wxMask
* mask
= bitmap
.GetMask() ;
50 m_macMask
= mask
->GetMaskBitmap() ;
54 // SetBackground(wxBrush(*wxWHITE, wxSOLID));
67 void wxMemoryDC::GetSize( int *width
, int *height
) const
71 if (width
) (*width
) = m_selected
.GetWidth();
72 if (height
) (*height
) = m_selected
.GetHeight();
76 if (width
) (*width
) = 0;
77 if (height
) (*height
) = 0;