KGameCanvasTiledPixmap Class Reference

#include <kgamecanvas.h>

Inheritance diagram for KGameCanvasTiledPixmap:

Inheritance graph
[legend]
Collaboration diagram for KGameCanvasTiledPixmap:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 KGameCanvasTiledPixmap (const QPixmap &pixmap, const QSize &size, const QPoint &origin, bool move_orig, KGameCanvasAbstract *canvas=NULL)
 Constructor, specifying the pixmap and the parameters to use.
 KGameCanvasTiledPixmap (KGameCanvasAbstract *canvas=NULL)
 Constructor, creating with an empty pixmap.
virtual ~KGameCanvasTiledPixmap ()
QPixmap pixmap () const
 Returns the pixmap.
void setPixmap (const QPixmap &pixmap)
 Sets the pixmap of the tile.
void setSize (const QSize &size)
 Sets the size.
QPoint origin () const
 The origin.
void setOrigin (const QPoint &size)
 Sets the origin of the tiles.
bool moveOrigin ()
 If the origin is moved.
void setMoveOrigin (bool move_orig)
 Sets if the origin of the brush will be moved with the pixmap.
virtual void paint (QPainter *p)
 Override this function to draw the item with the painter.
virtual QRect rect () const
 Override this function to return the rect the item will be drawn into.
virtual bool layered () const
 Override this function to specify if the painting operations will paint over each other.


Detailed Description

A tiled pixmap (brush).

A KGameCanvasPixmap is a pixmap that can be put in the canvas.

Definition at line 364 of file kgamecanvas.h.


Constructor & Destructor Documentation

KGameCanvasTiledPixmap::KGameCanvasTiledPixmap ( const QPixmap &  pixmap,
const QSize &  size,
const QPoint &  origin,
bool  move_orig,
KGameCanvasAbstract canvas = NULL 
)

Constructor, specifying the pixmap and the parameters to use.

Definition at line 702 of file kgamecanvas.cpp.

KGameCanvasTiledPixmap::KGameCanvasTiledPixmap ( KGameCanvasAbstract canvas = NULL  ) 

Constructor, creating with an empty pixmap.

Definition at line 712 of file kgamecanvas.cpp.

KGameCanvasTiledPixmap::~KGameCanvasTiledPixmap (  )  [virtual]

Definition at line 720 of file kgamecanvas.cpp.


Member Function Documentation

QPixmap KGameCanvasTiledPixmap::pixmap (  )  const [inline]

Returns the pixmap.

Definition at line 383 of file kgamecanvas.h.

void KGameCanvasTiledPixmap::setPixmap ( const QPixmap &  pixmap  ) 

Sets the pixmap of the tile.

Definition at line 724 of file kgamecanvas.cpp.

References KGameCanvasItem::canvas(), KGameCanvasItem::changed(), and KGameCanvasItem::visible().

Here is the call graph for this function:

void KGameCanvasTiledPixmap::setSize ( const QSize &  size  ) 

Sets the size.

Definition at line 730 of file kgamecanvas.cpp.

References KGameCanvasItem::canvas(), KGameCanvasItem::changed(), and KGameCanvasItem::visible().

Here is the call graph for this function:

QPoint KGameCanvasTiledPixmap::origin (  )  const [inline]

The origin.

Definition at line 392 of file kgamecanvas.h.

References KGameCanvasItem::pos().

Here is the call graph for this function:

void KGameCanvasTiledPixmap::setOrigin ( const QPoint &  size  ) 

Sets the origin of the tiles.

Definition at line 736 of file kgamecanvas.cpp.

References KGameCanvasItem::canvas(), KGameCanvasItem::changed(), KGameCanvasItem::pos(), and KGameCanvasItem::visible().

Here is the call graph for this function:

bool KGameCanvasTiledPixmap::moveOrigin (  )  [inline]

If the origin is moved.

Definition at line 398 of file kgamecanvas.h.

void KGameCanvasTiledPixmap::setMoveOrigin ( bool  move_orig  ) 

Sets if the origin of the brush will be moved with the pixmap.

Definition at line 745 of file kgamecanvas.cpp.

References KGameCanvasItem::pos().

Here is the call graph for this function:

void KGameCanvasTiledPixmap::paint ( QPainter *  p  )  [virtual]

Override this function to draw the item with the painter.

Implements KGameCanvasItem.

Definition at line 754 of file kgamecanvas.cpp.

References KGameCanvasItem::pos(), and rect().

Here is the call graph for this function:

QRect KGameCanvasTiledPixmap::rect (  )  const [virtual]

Override this function to return the rect the item will be drawn into.

Implements KGameCanvasItem.

Definition at line 762 of file kgamecanvas.cpp.

References KGameCanvasItem::pos().

Referenced by paint().

Here is the call graph for this function:

virtual bool KGameCanvasTiledPixmap::layered (  )  const [inline, virtual]

Override this function to specify if the painting operations will paint over each other.

If not, the item will be drawn more quickly when opacity is != 255, because it does not have to be painted onto a pixmap first. If you don't care about the item's opacity, don't care about this function as well.

Reimplemented from KGameCanvasItem.

Definition at line 405 of file kgamecanvas.h.


The documentation for this class was generated from the following files:
Generated on Sun Mar 16 08:03:18 2008 for Libkdegames by  doxygen 1.5.3