]> git.saurik.com Git - wxWidgets.git/commitdiff
add GetSize also to wxGDIImage since wxBitmap under some ports derives from wxGDIImag...
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Sat, 29 Nov 2008 00:24:57 +0000 (00:24 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Sat, 29 Nov 2008 00:24:57 +0000 (00:24 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/gdiimage.h
include/wx/os2/gdiimage.h
include/wx/palmos/gdiimage.h

index 6ab0fa5a7761c69d38876634955655fa28ca83c4..d39a52b79efa840a3351d54c6dcc9277bc603940 100644 (file)
@@ -113,6 +113,12 @@ public:
     int GetHeight() const { return IsNull() ? 0 : GetGDIImageData()->m_height; }
     int GetDepth() const { return IsNull() ? 0 : GetGDIImageData()->m_depth; }
 
     int GetHeight() const { return IsNull() ? 0 : GetGDIImageData()->m_height; }
     int GetDepth() const { return IsNull() ? 0 : GetGDIImageData()->m_depth; }
 
+    wxSize GetSize() const
+    {
+        return IsNull() ? wxSize(0,0) :
+               wxSize(GetGDIImageData()->m_width, GetGDIImageData()->m_height);
+    }
+
     void SetWidth(int w) { AllocExclusive(); GetGDIImageData()->m_width = w; }
     void SetHeight(int h) { AllocExclusive(); GetGDIImageData()->m_height = h; }
     void SetDepth(int d) { AllocExclusive(); GetGDIImageData()->m_depth = d; }
     void SetWidth(int w) { AllocExclusive(); GetGDIImageData()->m_width = w; }
     void SetHeight(int h) { AllocExclusive(); GetGDIImageData()->m_height = h; }
     void SetDepth(int d) { AllocExclusive(); GetGDIImageData()->m_depth = d; }
index 8b5625abdfc1c0f70a1d94ca675419c53d354921..7d96b89e9f1f51a31b1fb81ce4142ba95a056fae 100644 (file)
@@ -191,6 +191,12 @@ public:
     int GetHeight() const { return IsNull() ? 0 : GetGDIImageData()->m_nHeight; }
     int GetDepth() const { return IsNull() ? 0 : GetGDIImageData()->m_nDepth; }
 
     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; }
     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; }
index 512d373a28d07fc54cdb78627de2608241aed97b..db0d112c376f5cb46e004ed9f333075c9dc73b2c 100644 (file)
@@ -151,6 +151,12 @@ public:
     int GetHeight() const { return IsNull() ? 0 : GetGDIImageData()->m_height; }
     int GetDepth() const { return IsNull() ? 0 : GetGDIImageData()->m_depth; }
 
     int GetHeight() const { return IsNull() ? 0 : GetGDIImageData()->m_height; }
     int GetDepth() const { return IsNull() ? 0 : GetGDIImageData()->m_depth; }
 
+    wxSize GetSize() const
+    {
+        return IsNull() ? wxSize(0,0) :
+               wxSize(GetGDIImageData()->m_width, GetGDIImageData()->m_height);
+    }
+
     void SetWidth(int w) { EnsureHasData(); GetGDIImageData()->m_width = w; }
     void SetHeight(int h) { EnsureHasData(); GetGDIImageData()->m_height = h; }
     void SetDepth(int d) { EnsureHasData(); GetGDIImageData()->m_depth = d; }
     void SetWidth(int w) { EnsureHasData(); GetGDIImageData()->m_width = w; }
     void SetHeight(int h) { EnsureHasData(); GetGDIImageData()->m_height = h; }
     void SetDepth(int d) { EnsureHasData(); GetGDIImageData()->m_depth = d; }