Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-12-17 21:28:15 +0000
committerStijn Buys <ingar@osirion.org>2013-12-17 21:28:15 +0000
commitc7f28c2c0c7d23712552f0cd6ea0cf462068e081 (patch)
treec5e1b21d7362ae923283bc766115725fb97b6759 /src/ui/paint.h
parent765d03abb9f031a9d608edaeb0f0f1bd6eded591 (diff)
Added a preserve_attribute option to the ui::Paint::print_bitmap() functions and the ui::Bitmap class,
preserve aspect ratio on the loader screen image and the main menu background.
Diffstat (limited to 'src/ui/paint.h')
-rw-r--r--src/ui/paint.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ui/paint.h b/src/ui/paint.h
index b2829ea..76cd8bf 100644
--- a/src/ui/paint.h
+++ b/src/ui/paint.h
@@ -8,6 +8,7 @@
#define __INCLUDED_UI_PAINT_H__
#include "ui/widget.h"
+#include "model/material.h"
namespace ui {
@@ -53,17 +54,17 @@ public:
* @brief draw a color gradient rectangle
* */
static void draw_rectangle_gradient(const math::Vector2f &global_location, const math::Vector2f &size, const math::Color & color_left, const math::Color & color_right);
-
+
/**
* @brief draw a rectangular bitmap
* @param texture the name of material to be used
- **/
- static void draw_bitmap(const math::Vector2f &global_location, const math::Vector2f &size, const std::string &texture);
+ **/
+ static void draw_bitmap(const math::Vector2f &global_location, const math::Vector2f &size, const std::string &texture, const float preserve_aspect = false);
/**
* @brief draw a rectangular bitmap and overrride material color
* */
- static void draw_bitmap(const math::Vector2f &global_location, const math::Vector2f &size, const math::Color & color, const std::string &texture);
+ static void draw_bitmap(const math::Vector2f &global_location, const math::Vector2f &size, const math::Color & color, const std::string &texture, const float preserve_aspect = false);
/**
* @brief draw a tiled bitmap