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

libkdegames

KGameCanvasRectangle Class Reference

#include <kgamecanvas.h>

Inheritance diagram for KGameCanvasRectangle:

Inheritance graph
[legend]

List of all members.


Detailed Description

A solid rectangle.

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

Definition at line 415 of file kgamecanvas.h.


Public Member Functions

 KGameCanvasRectangle (const QColor &color, const QSize &size, KGameCanvasAbstract *canvas=NULL)
 KGameCanvasRectangle (KGameCanvasAbstract *canvas=NULL)
virtual ~KGameCanvasRectangle ()
QColor color () const
void setColor (const QColor &color)
void setSize (const QSize &size)
virtual void paint (QPainter *p)
virtual QRect rect () const
virtual bool layered () const

Constructor & Destructor Documentation

KGameCanvasRectangle::KGameCanvasRectangle ( const QColor &  color,
const QSize &  size,
KGameCanvasAbstract *  canvas = NULL 
)

Constructor, specifying the pixmap and the parameters to use.

Definition at line 771 of file kgamecanvas.cpp.

KGameCanvasRectangle::KGameCanvasRectangle ( KGameCanvasAbstract *  canvas = NULL  ) 

Constructor, creating with an empty pixmap.

Definition at line 779 of file kgamecanvas.cpp.

KGameCanvasRectangle::~KGameCanvasRectangle (  )  [virtual]

Definition at line 786 of file kgamecanvas.cpp.


Member Function Documentation

QColor KGameCanvasRectangle::color (  )  const [inline]

Returns the color.

Definition at line 431 of file kgamecanvas.h.

void KGameCanvasRectangle::setColor ( const QColor &  color  ) 

Sets the color.

Definition at line 791 of file kgamecanvas.cpp.

void KGameCanvasRectangle::setSize ( const QSize &  size  ) 

Sets the size.

Definition at line 798 of file kgamecanvas.cpp.

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

Override this function to draw the item with the painter.

Implements KGameCanvasItem.

Definition at line 805 of file kgamecanvas.cpp.

QRect KGameCanvasRectangle::rect (  )  const [virtual]

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

Implements KGameCanvasItem.

Definition at line 809 of file kgamecanvas.cpp.

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


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