SkyGI::Image Class Reference

Inheritance diagram for SkyGI::Image:
[legend]
Collaboration diagram for SkyGI::Image:
[legend]
List of all members.

Public Member Functions

 Image ()
 Image (Image *pImage, Colorspace nNewColorspace=COLORSPACE_UNDEFINED)
 Image (const String &szPath, Colorspace nNewColorspace=COLORSPACE_UNDEFINED)
 Image (const String &szPath, int iWidth, int iHeight, int iBPP, int iIndex, Colorspace nNewColorspace=COLORSPACE_UNDEFINED)
 Image (const Point &rSize, Colorspace nColorspace, void *vpData=NULL)
 ~Image ()
int Load (const String &szPath)
int LoadIndex (const String &szPath, int iIndex)
int LoadIcon (const String &szPath, int iWidth, int iHeight, int iBPP, int iIndex)
int Create (int iWidth, int iHeight, Colorspace nColorSpace)
int Create (void *vpData, int iWidth, int iHeight, Colorspace nColorSpace)
void Invalidate ()
int Width ()
int Height ()
void * Data ()
int Size ()
int BitsPerPixel ()
int BytePerPixel ()
Rect GetBounds ()
Colorspace GetColorspace ()
bool HasAlphaTransparency ()
bool IsValid ()
bool SetMask (void *vpMask, const Point &pSize)
void * GetMask ()
Point GetMaskSize ()
bool GetMaskBit (int x, int y)
bool SetPixel (int x, int y, Color color)
Color GetPixel (int x, int y)
ImageScale (const Point &rNewSize, const Rect &rSourceRect, unsigned int uiImageScaleFlags=0)
bool Convert (Colorspace NewColorspace, const Rect &rConvertRect, bool bIngoreMask=false)
bool Colorize (Color nColor)
bool ApplyTransparency (int iLevel, bool bIgnoreMask=false)
bool SetTransparency (int iLevel, bool bIgnoreMask)
void SetFreeMemory (bool bFree)
void DumpInfo (void)
ImageExtract (const Rect &rRect)

Detailed Description

Examples:

button.cpp, dnd.cpp, listview.cpp, messagebox.cpp, progressbar.cpp, and textview.cpp.


Constructor & Destructor Documentation

Image::Image (  ) 

Image::Image ( Image pImage,
Colorspace  nNewColorspace = COLORSPACE_UNDEFINED 
)

Create an Image from an already existing one

Description:
All data from the source Image will be duplicated, including the bitmap data, dimension, AND mask, etc. Optionally a Colorspace conversion is done.

Image::Image ( const String szPath,
Colorspace  nNewColorspace = COLORSPACE_UNDEFINED 
)

Load an image from specified path

Description:
Loads an image (the first image inside the file if it supports multiple images) from disk. Optionally a Colorspace converstion will be done. Use IsValid to check if the image was loaded successfully
Parameters:
szPath - Path to the image
nNewColorspace - Converts Image to specified Colorspace it not equal COLORSPACE_UNDEFINED
Returns:
Errno

Image::Image ( const String szPath,
int  iWidth,
int  iHeight,
int  iBPP,
int  iIndex,
Colorspace  nNewColorspace = COLORSPACE_UNDEFINED 
)

Image::Image ( const Point rSize,
Colorspace  nColorspace,
void *  vpData = NULL 
)

Image::~Image (  ) 


Member Function Documentation

int Image::Load ( const String szPath  ) 

Load an image from specified path

Description:
Loads an image (the first image inside the file if it supports multiple images) from disk.
Returns:
Errno

int Image::LoadIndex ( const String szPath,
int  iIndex 
)

int Image::LoadIcon ( const String szPath,
int  iWidth,
int  iHeight,
int  iBPP,
int  iIndex 
)

Load an image from specified path

Description:
Loads an image (the first image inside the file if it supports multiple images) from disk. Optionally a Colorspace converstion will be done.
Returns:
Errno

int Image::Create ( int  iWidth,
int  iHeight,
Colorspace  nColorSpace 
)

int Image::Create ( void *  vpData,
int  iWidth,
int  iHeight,
Colorspace  nColorSpace 
)

void Image::Invalidate (  ) 

int SkyGI::Image::Width (  )  [inline]

int SkyGI::Image::Height (  )  [inline]

void* SkyGI::Image::Data (  )  [inline]

int SkyGI::Image::Size (  )  [inline]

int Image::BitsPerPixel (  ) 

int Image::BytePerPixel (  ) 

Rect SkyGI::Image::GetBounds (  )  [inline]

Examples:
messagebox.cpp.

Colorspace SkyGI::Image::GetColorspace (  )  [inline]

bool Image::HasAlphaTransparency (  ) 

bool Image::IsValid (  ) 

bool Image::SetMask ( void *  vpMask,
const Point pSize 
)

Set an AND mask

Description:
Only pixels which have the bit set in the AND mask will be drawn. Pixels with bit zero in the end mask will be drawn transparent. The AND mask will be reset on Invalidate(), Create() and Load()
Returns:
Errno
See also:
GetMask

void * Image::GetMask (  ) 

Point Image::GetMaskSize (  ) 

bool Image::GetMaskBit ( int  x,
int  y 
)

bool Image::SetPixel ( int  x,
int  y,
Color  color 
)

Color Image::GetPixel ( int  x,
int  y 
)

Image * Image::Scale ( const Point rNewSize,
const Rect rSourceRect,
unsigned int  uiImageScaleFlags = 0 
)

Examples:
messagebox.cpp.

bool Image::Convert ( Colorspace  NewColorspace,
const Rect rConvertRect,
bool  bIgnoreMask = false 
)

Convert image colorspace

Description:
Converts the image from one colorspace into another.
Transparence:
If the destination colorspace is COLORSPACE_RGBA32 and the source colorspace is not COLORSPACE_RGBA32, SetTransparent will be called implicity with a transparent value of 0xFF meaning all pixels will be set to visible. If bIgnoreMask = false only pixels which are set to be visible through a optional Mask will be visible. (bIgnoreMask = false is default).

bool Image::Colorize ( Color  nColor  ) 

Examples:
button.cpp.

bool Image::ApplyTransparency ( int  iLevel,
bool  bIgnoreMask = false 
)

bool Image::SetTransparency ( int  iLevel,
bool  bIgnoreMask 
)

void Image::SetFreeMemory ( bool  bFree  ) 

void Image::DumpInfo ( void   ) 

Image * Image::Extract ( const Rect rRect  ) 


Generated on Thu Dec 13 18:14:27 2007 for SkyGI by  doxygen 1.5.1-p1