add GetSize also to wxGDIImage since wxBitmap under some ports derives from wxGDIImage and not from wxBitmapBase

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-11-29 00:24:57 +00:00
parent 36d0c79521
commit 339cfab649
3 changed files with 18 additions and 0 deletions

View File

@@ -191,6 +191,12 @@ public:
int GetHeight() const { return IsNull() ? 0 : GetGDIImageData()->m_nHeight; }
int GetDepth() const { return IsNull() ? 0 : GetGDIImageData()->m_nDepth; }
wxSize GetSize() const
{
return IsNull() ? wxSize(0,0) :
wxSize(GetGDIImageData()->m_nWidth, GetGDIImageData()->m_nHeight);
}
void SetWidth(int nW) { EnsureHasData(); GetGDIImageData()->m_nWidth = nW; }
void SetHeight(int nH) { EnsureHasData(); GetGDIImageData()->m_nHeight = nH; }
void SetDepth(int nD) { EnsureHasData(); GetGDIImageData()->m_nDepth = nD; }