Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

MImage Class Reference

Represents an image. More...

#include <MImage.h>

List of all members.

Public Member Functions

virtual unsigned int GetWidth ()=0
 Returns the width of this image in pixels.

virtual unsigned int GetHeight ()=0
 Returns the height of this image in pixels.

virtual unsigned int GetBitsPerPixel ()=0
 Returns the number of bits used by each pixel of this image.

virtual bool Render (MFrameBuffer &aFrameBuffer, unsigned int aX, unsigned int aY)=0
 Renders this image on given MFrameBuffer.

virtual bool RenderPartial (MFrameBuffer &aFrameBuffer, unsigned int aX, unsigned int aY, unsigned int aVisibleX, unsigned int aVisibleY, unsigned int aVisibleSizeX, unsigned int aVisibleSizeY)=0
 Renders this image on given MFrameBuffer with clipping.


Static Public Member Functions

MImageCreateBMPImage (int aFile, int aTransparentRed=-1, int aTransparentGreen=-1, int aTransparentBlue=-1)
 Constructs the BMP image from a given file.


Detailed Description

Represents an image.

This interface stores the image data and provides the possibility to draw itself on MFrameBuffer


Member Function Documentation

MImage* MImage::CreateBMPImage int  aFile,
int  aTransparentRed = -1,
int  aTransparentGreen = -1,
int  aTransparentBlue = -1
[static]
 

Constructs the BMP image from a given file.

The image supports color transparency. If a color is defined as a transparent, all image pixels that have the transparent color are not rendered.

The input aFile is closed automatically if returned value is not NULL

The returned pointer should be explicitly deleted by the application when it is not needed any more.

Parameters:
aFile Image file descriptor. It is closed after the image is constructed
aTransparentRed Red color component value used as a transparent color while rendering
aTransparentGreen Green color component value used as a transparent color while rendering
aTransparentBlue Blue color component value used as a transparent color while rendering
Warning:
Images take a lot of memory so use only the images you really need

virtual bool MImage::RenderPartial MFrameBuffer aFrameBuffer,
unsigned int  aX,
unsigned int  aY,
unsigned int  aVisibleX,
unsigned int  aVisibleY,
unsigned int  aVisibleSizeX,
unsigned int  aVisibleSizeY
[pure virtual]
 

Renders this image on given MFrameBuffer with clipping.

Parameters:
aFrameBuffer A reference to a MFrameBuffer to draw on
aX X coordinate of top left corner of the image
aY Y coordinate of top left corner of the image
aVisibleX X coordinate of first visible pixel
aVisibleY Y coordinate of first visible pixel
aVisibleSizeX Visible width
aVisibleSizeY Visible height
All coordinates are absolute screen coordinates


The documentation for this class was generated from the following file:
Generated on Fri Jul 15 16:46:44 2005 for TomTom GO User Interface library by doxygen 1.3.5