Irrlicht 3D Engine
IGUIImage.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt
2 // This file is part of the "Irrlicht Engine".
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
4 
5 #ifndef __I_GUI_IMAGE_H_INCLUDED__
6 #define __I_GUI_IMAGE_H_INCLUDED__
7 
8 #include "IGUIElement.h"
9 
10 namespace irr
11 {
12 namespace video
13 {
14  class ITexture;
15 }
16 namespace gui
17 {
18 
20  class IGUIImage : public IGUIElement
21  {
22  public:
23 
25  IGUIImage(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
26  : IGUIElement(EGUIET_IMAGE, environment, parent, id, rectangle) {}
27 
29  virtual void setImage(video::ITexture* image) = 0;
30 
32  virtual video::ITexture* getImage() const = 0;
33 
35  virtual void setColor(video::SColor color) = 0;
36 
38  virtual void setScaleImage(bool scale) = 0;
39 
41  virtual void setUseAlphaChannel(bool use) = 0;
42 
44  virtual video::SColor getColor() const = 0;
45 
47  virtual bool isImageScaled() const = 0;
48 
50  virtual bool isAlphaChannelUsed() const = 0;
51  };
52 
53 
54 } // end namespace gui
55 } // end namespace irr
56 
57 #endif
58 
irr::gui::IGUIImage::setUseAlphaChannel
virtual void setUseAlphaChannel(bool use)=0
Sets if the image should use its alpha channel to draw itself.
irr::video::ITexture
Interface of a Video Driver dependent Texture.
Definition: ITexture.h:98
irr::gui::IGUIImage::IGUIImage
IGUIImage(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)
constructor
Definition: IGUIImage.h:25
irr::s32
signed int s32
32 bit signed variable.
Definition: irrTypes.h:66
irr::gui::IGUIImage::setColor
virtual void setColor(video::SColor color)=0
Sets the color of the image.
irr::gui::IGUIImage::isImageScaled
virtual bool isImageScaled() const =0
Returns true if the image is scaled to fit, false if not.
irr::gui::EGUIET_IMAGE
@ EGUIET_IMAGE
An image (IGUIImage)
Definition: EGUIElementTypes.h:47
irr::gui::IGUIImage::getColor
virtual video::SColor getColor() const =0
Gets the color of the image.
IGUIElement.h
irr::gui::IGUIImage::getImage
virtual video::ITexture * getImage() const =0
Gets the image texture.
irr::gui::IGUIImage::setScaleImage
virtual void setScaleImage(bool scale)=0
Sets if the image should scale to fit the element.
irr::gui::IGUIImage::setImage
virtual void setImage(video::ITexture *image)=0
Sets an image texture.
irr
Everything in the Irrlicht Engine can be found in this namespace.
Definition: aabbox3d.h:12
irr::core::rect< s32 >
irr::gui::IGUIImage
GUI element displaying an image.
Definition: IGUIImage.h:20
irr::gui::IGUIEnvironment
GUI Environment. Used as factory and manager of all other GUI elements.
Definition: IGUIEnvironment.h:70
irr::video::SColor
Class representing a 32 bit ARGB color.
Definition: SColor.h:201
irr::gui::IGUIImage::isAlphaChannelUsed
virtual bool isAlphaChannelUsed() const =0
Returns true if the image is using the alpha channel, false if not.
irr::gui::IGUIElement
Base class of all GUI elements.
Definition: IGUIElement.h:25