GUI::Image Class Reference

Image that can be loaded/drawed. More...

#include <Image.h>

List of all members.

Public Member Functions

 Image ()
 Default Constructor.
 Image (string imageFile, wxBitmapType imageType=wxBITMAP_TYPE_BMP)
 Constructor.
 ~Image ()
 Destructor.
void Scale (int size)
 Scales image.
void Draw (wxCoord x, wxCoord y, wxDC &dc, const Direction &dir)
 Draws image on the screen.
const string & GetImageFileName () const
 Returns file name of the image (with path), as it were passed to the constructor.
void ChangeImage (const string &imageFile, wxBitmapType imageType=wxBITMAP_TYPE_BMP)
 Reloads Image.
const wxImage & GetLoadedImage () const
 Returns loadedImage.

Private Member Functions

void CheckImageDirection (const Direction &dir)
 Checks and changes direction of the image if needed.
void LoadImage (const string &imageFile, wxBitmapType imageType)
 Loads image from file.

Private Attributes

string imageFileName
 Image file name (needed in configs).
wxImage loadedImage
 Image loaded from the file - unsized original.
wxImage image
 Drawn image, sized with direction.
Direction direction
 Drawn image direction.


Detailed Description

Image that can be loaded/drawed.


Constructor & Destructor Documentation

GUI::Image::Image (  )  [inline]

Default Constructor.

GUI::Image::Image ( string  imageFile,
wxBitmapType  imageType = wxBITMAP_TYPE_BMP 
)

Constructor.

Parameters:
imageFile File containing image
imageType Type of the image

GUI::Image::~Image (  )  [inline]

Destructor.


Member Function Documentation

void GUI::Image::ChangeImage ( const string &  imageFile,
wxBitmapType  imageType = wxBITMAP_TYPE_BMP 
) [inline]

Reloads Image.

void GUI::Image::CheckImageDirection ( const Direction dir  )  [private]

Checks and changes direction of the image if needed.

Parameters:
dir Direction we need draw
Changes image direction if needed.

void GUI::Image::Draw ( wxCoord  x,
wxCoord  y,
wxDC &  dc,
const Direction dir 
)

Draws image on the screen.

Parameters:
x X-line
y Y-line
dc Device context onto which graphics can be drawn
dir Direction of the image

const string& GUI::Image::GetImageFileName (  )  const [inline]

Returns file name of the image (with path), as it were passed to the constructor.

const wxImage& GUI::Image::GetLoadedImage (  )  const [inline]

Returns loadedImage.

void GUI::Image::LoadImage ( const string &  imageFile,
wxBitmapType  imageType 
) [private]

Loads image from file.

Parameters:
imageFile The name of the iamge
imageType The type of the image

void GUI::Image::Scale ( int  size  ) 

Scales image.

Parameters:
size Size of the picture in pixels


Member Data Documentation

Direction GUI::Image::direction [private]

Drawn image direction.

wxImage GUI::Image::image [private]

Drawn image, sized with direction.

string GUI::Image::imageFileName [private]

Image file name (needed in configs).

wxImage GUI::Image::loadedImage [private]

Image loaded from the file - unsized original.


The documentation for this class was generated from the following files:
Generated on Sun Apr 29 11:46:11 2007 for IPP/ICP2007 by  doxygen 1.4.7