From c7f28c2c0c7d23712552f0cd6ea0cf462068e081 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 17 Dec 2013 21:28:15 +0000 Subject: 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. --- src/ui/paint.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/ui/paint.h') 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 -- cgit v1.2.3