Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

WiPicture Class Reference

Inheritance diagram for WiPicture:

Inheritance graph
[legend]
Collaboration diagram for WiPicture:

Collaboration graph
[legend]

Detailed Description

Picture widget.

Definition at line 11 of file WiPicture.h.

Public Member Functions

 WiPicture (const Path &picture)
virtual ~WiPicture ()
virtual int getW () const
virtual int getH () const
virtual void drawOn (SDL_Surface *screen)

Protected Member Functions

 WiPicture (SDL_Surface *new_surface)

Protected Attributes

SDL_Surface * m_surface


Constructor & Destructor Documentation

WiPicture::WiPicture SDL_Surface *  new_surface  )  [inline, protected]
 

Definition at line 15 of file WiPicture.h.

00015 { m_surface = new_surface; }

WiPicture::WiPicture const Path picture  ) 
 

Definition at line 14 of file WiPicture.cpp.

00015 {
00016     m_surface = ResImagePack::loadImage(picture);
00017 }

WiPicture::~WiPicture  )  [virtual]
 

Definition at line 19 of file WiPicture.cpp.

00020 {
00021     SDL_FreeSurface(m_surface);
00022 }


Member Function Documentation

void WiPicture::drawOn SDL_Surface *  screen  )  [virtual]
 

Implements Drawable.

Definition at line 25 of file WiPicture.cpp.

00026 {
00027     SDL_Rect rect;
00028     rect.x = m_shift.getX();
00029     rect.y = m_shift.getY();
00030     SDL_BlitSurface(m_surface, NULL, screen, &rect);
00031 }

virtual int WiPicture::getH  )  const [inline, virtual]
 

Implements IWidget.

Definition at line 20 of file WiPicture.h.

00020 { return m_surface->h; }

virtual int WiPicture::getW  )  const [inline, virtual]
 

Implements IWidget.

Definition at line 19 of file WiPicture.h.

00019 { return m_surface->w; }


Field Documentation

SDL_Surface* WiPicture::m_surface [protected]
 

Definition at line 13 of file WiPicture.h.


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:57:20 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2