1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxMemoryDC class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_DCMEMORY_H_
13 #define _WX_DCMEMORY_H_
15 #include "wx/dcmemory.h"
16 #include "wx/os2/dc.h"
18 class WXDLLIMPEXP_CORE wxMemoryDCImpl
: public wxPMDCImpl
21 wxMemoryDCImpl( wxMemoryDC
*owner
);
22 wxMemoryDCImpl( wxMemoryDC
*owner
, wxBitmap
& bitmap
);
23 wxMemoryDCImpl( wxMemoryDC
*owner
, wxDC
* pDC
); // Create compatible DC
25 // override some base class virtuals
26 virtual void DoGetSize(int* pWidth
, int* pHeight
) const;
27 virtual void DoSelect(const wxBitmap
& bitmap
);
29 virtual wxBitmap
DoGetAsBitmap(const wxRect
* subrect
) const
30 { return subrect
== NULL
? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect
);}
33 // create DC compatible with the given one or screen if dc == NULL
34 bool CreateCompatible(wxDC
* pDC
);
36 // initialize the newly created DC
39 DECLARE_CLASS(wxMemoryDCImpl
)
40 wxDECLARE_NO_COPY_CLASS(wxMemoryDCImpl
);
41 }; // end of CLASS wxMemoryDCImpl