protected:
void DoGetSize( int *width, int *height ) const;
+ virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const
+ { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect); }
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
};
wxMemoryDC( wxDC *dc ); // Create compatible DC
virtual ~wxMemoryDC(void);
virtual void SelectObject( const wxBitmap& bitmap );
- wxBitmap GetSelectedBitmap() { return m_selected ; }
+ const wxBitmap& GetSelectedBitmap() const { return m_selected; }
+ wxBitmap GetSelectedBitmap() { return m_selected; }
+
wxBitmap GetSelectedObject() { return GetSelectedBitmap() ; }
protected:
virtual void DoGetSize( int *width, int *height ) const;
+ virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const
+ { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect); }
private:
wxBitmap m_selected;
virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[],
wxCoord xoffset, wxCoord yoffset,
int fillStyle = wxODDEVEN_RULE);
+ virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const
+ { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect); }
#if wxUSE_PALETTE