X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fvideo%2Fsurface.hpp;h=d7021815d20642e2116e5811d42c6152f33df339;hb=6cd71a8644049d1951b5a9702a57ad02a7971c1e;hp=8961606edc14158b8be89caf03eee96587bc598f;hpb=49796e6cc2385aea989d7c44c789b406190f2bf7;p=supertux.git diff --git a/src/video/surface.hpp b/src/video/surface.hpp index 8961606ed..d7021815d 100644 --- a/src/video/surface.hpp +++ b/src/video/surface.hpp @@ -1,5 +1,5 @@ // $Id$ -// +// // SuperTux // Copyright (C) 2006 Matthias Braun // @@ -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,7 +21,10 @@ #define __SURFACE_HPP__ #include +#include "math/vector.hpp" +class Color; +class Blend; class ImageTexture; /// bitset for drawing effects @@ -51,7 +54,7 @@ private: float uv_right; float uv_bottom; - void draw(float x, float y, float alpha, float angle, DrawingEffect effect) const; + void draw(float x, float y, float alpha, float angle, const Color& color, const Blend& blend, DrawingEffect effect) const; void draw(float x, float y, float alpha, DrawingEffect effect) const; void draw_part(float src_x, float src_y, float dst_x, float dst_y, float width, float height, @@ -67,7 +70,7 @@ public: /** flip the surface horizontally */ void hflip(); - + const Surface& operator= (const Surface& other); float get_width() const @@ -79,6 +82,13 @@ public: { return height; } + + /** + * returns a vector containing width and height + */ + Vector get_size() const + { return Vector(get_width(), get_height()); } + }; #endif