IGUIImage.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. #ifndef __I_GUI_IMAGE_H_INCLUDED__
  5. #define __I_GUI_IMAGE_H_INCLUDED__
  6. #include "IGUIElement.h"
  7. namespace irr
  8. {
  9. namespace video
  10. {
  11. class ITexture;
  12. }
  13. namespace gui
  14. {
  15. //! GUI element displaying an image.
  16. class IGUIImage : public IGUIElement
  17. {
  18. public:
  19. //! constructor
  20. IGUIImage(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
  21. : IGUIElement(EGUIET_IMAGE, environment, parent, id, rectangle) {}
  22. //! Sets an image texture
  23. virtual void setImage(video::ITexture* image) = 0;
  24. //! Gets the image texture
  25. virtual video::ITexture* getImage() const = 0;
  26. //! Sets the color of the image
  27. virtual void setColor(video::SColor color) = 0;
  28. //! Sets if the image should scale to fit the element
  29. virtual void setScaleImage(bool scale) = 0;
  30. //! Sets if the image should use its alpha channel to draw itself
  31. virtual void setUseAlphaChannel(bool use) = 0;
  32. //! Gets the color of the image
  33. virtual video::SColor getColor() const = 0;
  34. //! Returns true if the image is scaled to fit, false if not
  35. virtual bool isImageScaled() const = 0;
  36. //! Returns true if the image is using the alpha channel, false if not
  37. virtual bool isAlphaChannelUsed() const = 0;
  38. };
  39. } // end namespace gui
  40. } // end namespace irr
  41. #endif