]> git.saurik.com Git - wxWidgets.git/commitdiff
default implementation for scaled bitmaps properties
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 25 Jun 2013 13:21:20 +0000 (13:21 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 25 Jun 2013 13:21:20 +0000 (13:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/bitmap.h

index fc2110755b3fb6474bcd784338d1366c5e3596ea..791b721d226194b8ab45a4678f729ae8aeb755a9 100644 (file)
@@ -182,6 +182,13 @@ public:
     wxSize GetSize() const
         { return wxSize(GetWidth(), GetHeight()); }
 
+    // support for scaled bitmaps
+    virtual double GetScale() const { return 1.0; }
+    virtual double GetScaledWidth() const { return GetWidth() / GetScale(); }
+    virtual double GetScaledHeight() const { return GetHeight() / GetScale(); }
+    virtual wxSize GetScaledSize() const
+    { return wxSize(GetScaledWidth(), GetScaledHeight()); }
+
 #if wxUSE_IMAGE
     virtual wxImage ConvertToImage() const = 0;