diff options
| author | Stijn Buys <ingar@osirion.org> | 2013-12-17 21:28:15 +0000 | 
|---|---|---|
| committer | Stijn Buys <ingar@osirion.org> | 2013-12-17 21:28:15 +0000 | 
| commit | c7f28c2c0c7d23712552f0cd6ea0cf462068e081 (patch) | |
| tree | c5e1b21d7362ae923283bc766115725fb97b6759 /src/ui/bitmap.h | |
| parent | 765d03abb9f031a9d608edaeb0f0f1bd6eded591 (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/bitmap.h')
| -rw-r--r-- | src/ui/bitmap.h | 12 | 
1 files changed, 10 insertions, 2 deletions
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;  };  }  | 
