- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Exponent::GUI::Graphics::IImage Interface Reference

Inheritance diagram for Exponent::GUI::Graphics::IImage:

List of all members.

## Detailed Description

Interface to an image.

Date:
  19/03/2005

Author:
  Paul Chana

Version:
  1.0.0 Initial version

  1.1.0 Made inherit from ICountedObject to preserve virtual IInage nature

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
  IImage.hpp,v 1.6 2007/02/11 02:16:22 paul Exp

Definition at line 42 of file IImage.hpp.

## Public Types

- enum EImageFormats {
  e_bitmap = 0,
  e_targa,
  e_png,
  e_jpeg,
  e_tiff,
  e_imageIcon
  }
    The types of image format. More...

## Public Member Functions

- virtual const CSystemString & getFileName () const=0
- virtual EImageFormats getImageFormat () const=0
- virtual CGImageRef getImageHandle () const=0
- virtual HBITMAP getImageHandle () const=0
- virtual const CDimension & getImageSize () const=0
- virtual const CRect & getNormalisedImageSize () const=0
- virtual bool hasImageLoaded () const=0
- virtual bool imageHasAlpha () const=0
- virtual bool loadFromFile (const CSystemString &filename)=0
- virtual void unloadImage ()=0
- virtual ~IImage ()

## Member Enumeration Documentation

enum Exponent::GUI::Graphics::IImage::EImageFormats

The types of image format.

Enumerator:

  e_bitmap | Reserved for future use
  e_targa | 32bpp Targa file format
  e_png | Reserved for future use
  e_jpeg | JPEG type file format
  e_tiff | Reserved for future use
  e_imageIcon | Small image, with constrained sizes

Definition at line 52 of file IImage.hpp.

## Constructor & Destructor Documentation

virtual Exponent::GUI::Graphics::IImage::~IImage | ( |  | ) | `[inline, virtual]`

Virtual destructor

Definition at line 67 of file IImage.hpp.

## Member Function Documentation

virtual const CSystemString& Exponent::GUI::Graphics::IImage::getFileName | ( |  | ) | const`[pure virtual]`

Get the file name of the image

Return values:

  | const | CSystemString& The name of the file that is currently loaded

Implemented in Exponent::GUI::Graphics::CBaseImage.

virtual EImageFormats Exponent::GUI::Graphics::IImage::getImageFormat | ( |  | ) | const`[pure virtual]`

Get the format

Return values:

  | EImageFormats | The format of the image

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

virtual CGImageRef Exponent::GUI::Graphics::IImage::getImageHandle | ( |  | ) | const`[pure virtual]`

Get the image handle

Return values:

  | CGImageRef | The mac image ref

Implemented in Exponent::GUI::Graphics::CBaseImage.

virtual HBITMAP Exponent::GUI::Graphics::IImage::getImageHandle | ( |  | ) | const`[pure virtual]`

Get the image handle

Return values:

  | HBITMAP | The windows bitmap

Implemented in Exponent::GUI::Graphics::CBaseImage.

virtual const CDimension& Exponent::GUI::Graphics::IImage::getImageSize | ( |  | ) | const`[pure virtual]`

Get the size of the image

Return values:

  | const | CDimension& The size of the image

Implemented in Exponent::GUI::Graphics::CBaseImage.

virtual const CRect& Exponent::GUI::Graphics::IImage::getNormalisedImageSize | ( |  | ) | const`[pure virtual]`

Get the normalised image size

Return values:

  | const | CRect& 0,0 original size

Implemented in Exponent::GUI::Graphics::CBaseImage.

virtual bool Exponent::GUI::Graphics::IImage::hasImageLoaded | ( |  | ) | const`[pure virtual]`

Is there an image loaded

Return values:

  | bool | True if image is loaded, false otherwise

Implemented in Exponent::GUI::Graphics::CBaseImage.

virtual bool Exponent::GUI::Graphics::IImage::imageHasAlpha | ( |  | ) | const`[pure virtual]`

Does the image have an alpha channel

Return values:

  | bool | True if the image has an alpha channel, false otherwise

Implemented in Exponent::GUI::Graphics::CBaseImage.

virtual bool Exponent::GUI::Graphics::IImage::loadFromFile | ( | const CSystemString & | filename | ) | `[pure virtual]`

Load from a file

Parameters:

  | filename | The name of the file

Return values:

  | bool | True if loaded the image properly, false on error

virtual void Exponent::GUI::Graphics::IImage::unloadImage | ( |  | ) | `[pure virtual]`

Unload the image

Implemented in Exponent::GUI::Graphics::CBaseImage.