Added filter to horizontal flip Surfaces.
[supertux.git] / lib / video / font.h
index bf4ebd5..2a5067a 100644 (file)
 namespace SuperTux
   {
 
+  enum {
+    LEFT_ALLIGN,
+    CENTER_ALLIGN,
+    RIGHT_ALLIGN
+    };
+
   /// Font
   class Font
     {
@@ -60,15 +66,20 @@ namespace SuperTux
       /// returns the height of the font.
       float get_height() const;
 
+      /** Draws the given text to the screen. Also needs the position.
+       * Type of alignment, drawing effect and alpha are optional. */
+      void draw(const std::string& text, const Vector& pos,
+                int allignment = LEFT_ALLIGN,
+                Uint32 drawing_effect = NONE_EFFECT, int alpha = 255);
+
     private:
       friend class DrawingContext;
 
-      void draw(const std::string& text, const Vector& pos,
-                Uint32 drawing_effect = NONE_EFFECT);
-      void draw_center(const std::string& text, const Vector& pos,
-                Uint32 drawing_effect = NONE_EFFECT);
+      void draw_text(const std::string& text, const Vector& pos,
+                Uint32 drawing_effect = NONE_EFFECT, int alpha = 255);
+
       void draw_chars(Surface* pchars, const std::string& text,
-                      const Vector& position, Uint32 drawing_effect);
+                      const Vector& position, Uint32 drawing_effect, int alpha);
 
       Surface* chars;
       Surface* shadow_chars;