fix all cases of not-optimal UV-coordinates
[supertux.git] / src / video / surface.hpp
index 0945253..d702181 100644 (file)
@@ -1,5 +1,5 @@
 //  $Id$
-// 
+//
 //  SuperTux
 //  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
 //
@@ -12,7 +12,7 @@
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  GNU General Public License for more details.
-// 
+//
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
@@ -21,6 +21,7 @@
 #define __SURFACE_HPP__
 
 #include <string>
+#include "math/vector.hpp"
 
 class Color;
 class Blend;
@@ -69,7 +70,7 @@ public:
 
   /** flip the surface horizontally */
   void hflip();
-  
+
   const Surface& operator= (const Surface& other);
 
   float get_width() const
@@ -81,6 +82,13 @@ public:
   {
     return height;
   }
+
+  /**
+   * returns a vector containing width and height
+   */
+  Vector get_size() const
+  { return Vector(get_width(), get_height()); }
+
 };
 
 #endif