• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libkdegames

KGameCanvasPixmap Class Reference

#include <KGameCanvas>

Inheritance diagram for KGameCanvasPixmap:

Inheritance graph
[legend]

List of all members.


Detailed Description

A pixmap (sprite).

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

Definition at line 333 of file kgamecanvas.h.


Public Member Functions

 KGameCanvasPixmap (KGameCanvasAbstract *canvas=NULL)
 KGameCanvasPixmap (const QPixmap &pixmap, KGameCanvasAbstract *canvas=NULL)
virtual bool layered () const
virtual void paint (QPainter *p)
QPixmap pixmap () const
virtual QRect rect () const
void setPixmap (const QPixmap &pixmap)
virtual ~KGameCanvasPixmap ()

Constructor & Destructor Documentation

KGameCanvasPixmap::KGameCanvasPixmap ( const QPixmap &  pixmap,
KGameCanvasAbstract *  canvas = NULL 
)

Constructor, specifying the pixmap to use.

Definition at line 670 of file kgamecanvas.cpp.

KGameCanvasPixmap::KGameCanvasPixmap ( KGameCanvasAbstract *  canvas = NULL  ) 

Constructor, creating with an empty pixmap.

Definition at line 675 of file kgamecanvas.cpp.

KGameCanvasPixmap::~KGameCanvasPixmap (  )  [virtual]

Definition at line 680 of file kgamecanvas.cpp.


Member Function Documentation

virtual bool KGameCanvasPixmap::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 355 of file kgamecanvas.h.

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

Override this function to draw the item with the painter.

Implements KGameCanvasItem.

Definition at line 690 of file kgamecanvas.cpp.

QPixmap KGameCanvasPixmap::pixmap (  )  const [inline]

Returns the pixmap.

Definition at line 348 of file kgamecanvas.h.

QRect KGameCanvasPixmap::rect (  )  const [virtual]

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

Implements KGameCanvasItem.

Definition at line 694 of file kgamecanvas.cpp.

void KGameCanvasPixmap::setPixmap ( const QPixmap &  pixmap  ) 

Sets the pixmap of the sprite.

Definition at line 684 of file kgamecanvas.cpp.


The documentation for this class was generated from the following files:
  • kgamecanvas.h
  • kgamecanvas.cpp

libkdegames

Skip menu "libkdegames"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • kblackbox
  • kgoldrunner
  • kmahjongg
  • ksquares
  • libkdegames
  •   highscore
  •   kgame
  •   kggzgames
  •   kggzmod
  •   kggznet
  • libkmahjongg
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal