Exponent::GUI::Graphics::CBaseImage Class Reference

Inheritance diagram for Exponent::GUI::Graphics::CBaseImage:

Exponent::GUI::Graphics::IImage Exponent::Basics::ICountedObject Exponent::GUI::Graphics::CBitmapImage Exponent::GUI::Graphics::CJPEGImage Exponent::GUI::Graphics::CPNGImage Exponent::GUI::Graphics::CTGAImage List of all members.

Detailed Description

A basic implementation of an image, including its object counting.

Date:
29/03/2005
Author:
Paul Chana
Version:
1.0.0 Initial version
Note:
All contents of this source code are copyright 2005 Exp Digital Uk.
This source file is covered by the licence conditions of the Infinity API. You should have recieved a copy
with the source code. If you didnt, please refer to http://www.expdigital.co.uk All content is the Intellectual property of Exp Digital Uk.
Certain sections of this code may come from other sources. They are credited where applicable.
If you have comments, suggestions or bug reports please visit http://support.expdigital.co.uk
Id
CBaseImage.hpp,v 1.3 2007/02/08 21:07:54 paul Exp

Definition at line 32 of file CBaseImage.hpp.

Public Member Functions

Protected Attributes


Constructor & Destructor Documentation

Exponent::GUI::Graphics::CBaseImage::CBaseImage (  ) 

Construction

virtual Exponent::GUI::Graphics::CBaseImage::~CBaseImage (  )  [virtual]

Destruction


Member Function Documentation

virtual void Exponent::GUI::Graphics::CBaseImage::dereference (  )  [virtual]

Decrement the reference count. Object is deleted if reference count is <= 0

Implements Exponent::Basics::ICountedObject.

virtual const CSystemString& Exponent::GUI::Graphics::CBaseImage::getFileName (  )  const [inline, virtual]

Get the file name of the image

Return values:
const CSystemString& The name of the file that is currently loaded

Implements Exponent::GUI::Graphics::IImage.

Definition at line 69 of file CBaseImage.hpp.

References m_filename.

virtual HBITMAP Exponent::GUI::Graphics::CBaseImage::getImageHandle (  )  const [inline, virtual]

Get the image handle

Return values:
HBITMAP The windows bitmap

Implements Exponent::GUI::Graphics::IImage.

Definition at line 113 of file CBaseImage.hpp.

References m_theBitmap.

virtual const CDimension& Exponent::GUI::Graphics::CBaseImage::getImageSize (  )  const [inline, virtual]

Get the size of the image

Return values:
const CDimension& The size of the image

Implements Exponent::GUI::Graphics::IImage.

Definition at line 57 of file CBaseImage.hpp.

References m_dimension.

const CString& Exponent::GUI::Graphics::CBaseImage::getLastError (  )  const [inline]

Get the last error that occured

Return values:
const CString& The last error

Definition at line 104 of file CBaseImage.hpp.

References m_lastError.

virtual const CRect& Exponent::GUI::Graphics::CBaseImage::getNormalisedImageSize (  )  const [inline, virtual]

Get the normalised image size

Return values:
const CRect& 0,0 original size

Implements Exponent::GUI::Graphics::IImage.

Definition at line 63 of file CBaseImage.hpp.

References m_size.

virtual void Exponent::GUI::Graphics::CBaseImage::getObjectDescription ( char *  string,
const long  size 
) const [virtual]

Get a description of the object

Parameters:
string On return is filled with the description
size The size of the stirng

Implements Exponent::Basics::ICountedObject.

virtual long Exponent::GUI::Graphics::CBaseImage::getReferenceCount (  )  const [virtual]

Get the reference count

Return values:
long The reference count

Implements Exponent::Basics::ICountedObject.

virtual bool Exponent::GUI::Graphics::CBaseImage::hasImageLoaded (  )  const [inline, virtual]

Is there an image loaded

Return values:
bool True if image is loaded, false otherwise

Implements Exponent::GUI::Graphics::IImage.

Definition at line 98 of file CBaseImage.hpp.

References m_imageLoaded.

virtual bool Exponent::GUI::Graphics::CBaseImage::imageHasAlpha (  )  const [inline, virtual]

Does the image have an alpha channel

Return values:
bool True if the image has an alpha channel, false otherwise

Implements Exponent::GUI::Graphics::IImage.

Definition at line 92 of file CBaseImage.hpp.

References m_hasAlpha.

virtual bool Exponent::GUI::Graphics::CBaseImage::loadFromFile ( const CSystemString &  filename  )  [inline, virtual]

Load from a file

Note:
This function is a stub and should be overridden, currently always returns false
Parameters:
filename The name of the file
Return values:
bool True if loaded the image properly, false on error

Reimplemented in Exponent::GUI::Graphics::CBitmapImage, Exponent::GUI::Graphics::CJPEGImage, Exponent::GUI::Graphics::CPNGImage, and Exponent::GUI::Graphics::CTGAImage.

Definition at line 79 of file CBaseImage.hpp.

virtual void Exponent::GUI::Graphics::CBaseImage::referenced (  )  [virtual]

Increment the reference count

Implements Exponent::Basics::ICountedObject.

virtual void Exponent::GUI::Graphics::CBaseImage::unloadImage (  )  [virtual]

Unload the image

Implements Exponent::GUI::Graphics::IImage.


Member Data Documentation

CDimension Exponent::GUI::Graphics::CBaseImage::m_dimension [protected]

dimension of the image

Definition at line 156 of file CBaseImage.hpp.

Referenced by getImageSize().

CSystemString Exponent::GUI::Graphics::CBaseImage::m_filename [protected]

Path to the file loaded

Definition at line 158 of file CBaseImage.hpp.

Referenced by getFileName().

bool Exponent::GUI::Graphics::CBaseImage::m_hasAlpha [protected]

Do we have alpha ?

Definition at line 153 of file CBaseImage.hpp.

Referenced by imageHasAlpha().

bool Exponent::GUI::Graphics::CBaseImage::m_imageLoaded [protected]

Is there an image loaded?

Definition at line 155 of file CBaseImage.hpp.

Referenced by hasImageLoaded().

CString Exponent::GUI::Graphics::CBaseImage::m_lastError [protected]

The last error that occurred, fill this in to have it included in exception reports

Definition at line 160 of file CBaseImage.hpp.

Referenced by getLastError().

long Exponent::GUI::Graphics::CBaseImage::m_referenceCount [protected]

How many things point to this item?

Definition at line 154 of file CBaseImage.hpp.

CRect Exponent::GUI::Graphics::CBaseImage::m_size [protected]

size of the image

Definition at line 157 of file CBaseImage.hpp.

Referenced by getNormalisedImageSize().

HBITMAP Exponent::GUI::Graphics::CBaseImage::m_theBitmap [protected]

The image

Definition at line 163 of file CBaseImage.hpp.

Referenced by getImageHandle().


Infinity API - Exponent::GUI::Graphics::CBaseImage Class Reference generated on 7 Mar 2007