NE::Renderer Class Reference

Renderer interface. More...

#include <NEngine/Renderer.h>

Inheritance diagram for NE::Renderer:
NE::SDL_Renderer

List of all members.

Public Member Functions

 Renderer (Window *pWin)
virtual bool clearScreen (const Colour &colour)=0
 Clear the screen using a Colour.
virtual bool drawRect (const Rect &tile, const Colour &colour) const =0
 Draw a rectangle using a Colour.
virtual bool drawSurface (const IVec2 &position, const Sprite &pSurface) const =0
 Draw a Sprite.
virtual bool drawSurface (const IVec2 &position, const Sprite &pSurface, const Colour &mask) const =0
 Draw a Sprite using a mask.
virtual bool drawSurface (const IVec2 &position, const Sprite &pSurface, const Rect &srcRect) const =0
 Draw a part of a Sprite.
virtual bool drawSurface (const IVec2 &position, const Sprite &pSurface, const Rect &srcRect, const Colour &mask) const =0
 Draw a part of a Sprite using a mask.
virtual bool updateWindow (void)=0
 Refresh the Window.

Protected Member Functions

void * getNativeWindow (void) const
 Give access to the native window to the childrens of the class.
void * getNativeSurface (const Sprite &sprite) const
 Give access to the native sprite to the childrens of the class.

Protected Attributes

WindowpWin

Detailed Description

Renderer interface.

The Renderer class gives an interface to implement new platform specific drawing functions.


Constructor & Destructor Documentation

NE::Renderer::Renderer ( Window pWin  )  [inline]
Parameters:
pWin the Window where to render

Member Function Documentation

bool NE::Renderer::clearScreen ( const Colour colour  )  [pure virtual]

Clear the screen using a Colour.

Parameters:
colour the Colour to use to clear the screen
Returns:
true if all goes right

Implemented in NE::SDL_Renderer.

bool NE::Renderer::drawRect ( const Rect tile,
const Colour colour 
) const [pure virtual]

Draw a rectangle using a Colour.

Parameters:
tile the Rect where to draw
colour the Colour of the rectangle
Returns:
true if all goes right

Implemented in NE::SDL_Renderer.

bool NE::Renderer::drawSurface ( const IVec2 position,
const Sprite pSurface,
const Rect srcRect,
const Colour mask 
) const [pure virtual]

Draw a part of a Sprite using a mask.

Parameters:
position the position where to draw
pSurface the sprite to draw
srcRect the part of the Sprite to use
mask Colour of the mask to use
Returns:
true if all goes right

Implemented in NE::SDL_Renderer.

bool NE::Renderer::drawSurface ( const IVec2 position,
const Sprite pSurface,
const Rect srcRect 
) const [pure virtual]

Draw a part of a Sprite.

Parameters:
position the position where to draw
pSurface the sprite to draw
srcRect the part of the Sprite to use
Returns:
true if all goes right

Implemented in NE::SDL_Renderer.

bool NE::Renderer::drawSurface ( const IVec2 position,
const Sprite pSurface,
const Colour mask 
) const [pure virtual]

Draw a Sprite using a mask.

Parameters:
position the position where to draw
pSurface the sprite to draw
mask Colour of the mask to use
Returns:
true if all goes right

Implemented in NE::SDL_Renderer.

bool NE::Renderer::drawSurface ( const IVec2 position,
const Sprite pSurface 
) const [pure virtual]

Draw a Sprite.

Parameters:
position the position where to draw
pSurface the sprite to draw
Returns:
true if all goes right

Implemented in NE::SDL_Renderer.

void * NE::Renderer::getNativeSurface ( const Sprite sprite  )  const [protected]

Give access to the native sprite to the childrens of the class.

Parameters:
sprite the sprite to use
Returns:
the pointer on the native sprite
void * NE::Renderer::getNativeWindow ( void   )  const [protected]

Give access to the native window to the childrens of the class.

Returns:
the pointer of the native window where to render
bool NE::Renderer::updateWindow ( void   )  [pure virtual]

Refresh the Window.

Returns:
true if all goes right

Implemented in NE::SDL_Renderer.


Member Data Documentation

Window* NE::Renderer::pWin [protected]

Window where the Renderer will draw


The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs
Generated on Thu Oct 6 22:11:38 2011 for WE_Kit by  doxygen 1.6.3