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/bitmap.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/ui/bitmap.h') diff --git a/src/ui/bitmap.h b/src/ui/bitmap.h index 4838ea2..123f12c 100644 --- a/src/ui/bitmap.h +++ b/src/ui/bitmap.h @@ -18,18 +18,25 @@ public: Bitmap(Widget *parent, const char *texture = 0); ~Bitmap(); - inline std::string const &texture() const { + inline const std::string & texture() const { return bitmap_texture; } - inline math::Color const &color() const { + inline const math::Color & color() const { return bitmap_color; } + + inline const bool preserve_aspect() const { + return bitmap_preserve_aspect; + } void set_texture(const std::string & texture); + void set_texture(const char *texture); void set_color(const math::Color &color); + + void set_preserve_aspect(const bool preserve_aspect); /// print bitmap description virtual void print(const size_t indent) const; @@ -41,6 +48,7 @@ protected: private: std::string bitmap_texture; math::Color bitmap_color; + bool bitmap_preserve_aspect; }; } -- cgit v1.2.3