PixelLightAPI  .
Public Member Functions | Protected Attributes
PLGui::Image Class Reference

Image class. More...

#include <Image.h>

List of all members.

Public Member Functions

PLGUI_API Image (Gui &cGui, const PLCore::String &sFilename="")
 Constructor.
PLGUI_API Image (const Image &cImage)
 Copy constructor.
PLGUI_API ~Image ()
 Destructor.
PLGUI_API Imageoperator= (const Image &cImage)
 Assignment operator.
PLGUI_API GuiGetGui () const
 Get owner GUI.
PLGUI_API ImageImpl * GetImpl () const
 Get implementation.
PLGUI_API bool IsEmpty () const
 Check if image has been loaded.
PLGUI_API bool Load (const PLCore::String &sFilename)
 Load image.
PLGUI_API bool LoadWithColorKey (const PLCore::String &sFilename, const PLGraphics::Color3 &cColor)
 Load image and apply a color key.
PLGUI_API PLCore::String GetFilename () const
 Get image filename.
PLGUI_API PLMath::Vector2i GetSize () const
 Get image size.
PLGUI_API PLCore::uint32 GetColorDepth () const
 Get color depth.

Protected Attributes

Guim_pGui
ImageImpl * m_pImageImpl
PLCore::String m_sFilename

Detailed Description

Image class.

Note:
  • Implementation of the bridge design pattern, this class is the abstraction

Constructor & Destructor Documentation

PLGUI_API PLGui::Image::Image ( Gui cGui,
const PLCore::String sFilename = "" 
)

Constructor.

Parameters:
[in]cGuiOwner GUI
[in]sFilenameImage filename
PLGUI_API PLGui::Image::Image ( const Image cImage)

Copy constructor.

Parameters:
[in]cImageImage that is copied
PLGUI_API PLGui::Image::~Image ( )

Destructor.


Member Function Documentation

PLGUI_API Image& PLGui::Image::operator= ( const Image cImage)

Assignment operator.

Parameters:
[in]cImageImage that is copied
PLGUI_API Gui* PLGui::Image::GetGui ( ) const

Get owner GUI.

Returns:
Pointer to GUI object (never a null pointer)
PLGUI_API ImageImpl* PLGui::Image::GetImpl ( ) const

Get implementation.

Returns:
Pointer to platform specific implementation
PLGUI_API bool PLGui::Image::IsEmpty ( ) const

Check if image has been loaded.

Returns:
'true' if image is empty, else 'false'
PLGUI_API bool PLGui::Image::Load ( const PLCore::String sFilename)

Load image.

Parameters:
[in]sFilenameName of image file
Returns:
'true' if all went fine, else 'false'
PLGUI_API bool PLGui::Image::LoadWithColorKey ( const PLCore::String sFilename,
const PLGraphics::Color3 cColor 
)

Load image and apply a color key.

Parameters:
[in]sFilenameName of image file
[in]cColorColor that will be treated as transparent
Returns:
'true' if all went fine, else 'false'

Get image filename.

Returns:
Filename of image

Get image size.

Returns:
Size of image
PLGUI_API PLCore::uint32 PLGui::Image::GetColorDepth ( ) const

Get color depth.

Returns:
Color depth

Member Data Documentation

Gui* PLGui::Image::m_pGui [protected]

GUI instance

ImageImpl* PLGui::Image::m_pImageImpl [protected]

Image implementation object

Image filename


The documentation for this class was generated from the following file:


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:18
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported