• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegames API Reference
  • KDE Home
  • Contact Us
 

libkdegames/libkdegamesprivate

Public Member Functions | List of all members
KGameCanvasTiledPixmap Class Reference

#include <KGameCanvas>

Inheritance diagram for KGameCanvasTiledPixmap:
Inheritance graph
[legend]

Public Member Functions

 KGameCanvasTiledPixmap (const QPixmap &pixmap, const QSize &size, const QPoint &origin, bool move_orig, KGameCanvasAbstract *canvas=NULL)
 
 KGameCanvasTiledPixmap (KGameCanvasAbstract *canvas=NULL)
 
virtual ~KGameCanvasTiledPixmap ()
 
virtual bool layered () const
 
bool moveOrigin ()
 
QPoint origin () const
 
virtual void paint (QPainter *p)
 
QPixmap pixmap () const
 
virtual QRect rect () const
 
void setMoveOrigin (bool move_orig)
 
void setOrigin (const QPoint &size)
 
void setPixmap (const QPixmap &pixmap)
 
void setSize (const QSize &size)
 
- Public Member Functions inherited from KGameCanvasItem
 KGameCanvasItem (KGameCanvasAbstract *canvas=NULL)
 
virtual ~KGameCanvasItem ()
 
QPoint absolutePosition () const
 
virtual void advance (int msecs)
 
bool animated () const
 
KGameCanvasAbstract * canvas () const
 
virtual void changed ()
 
void hide ()
 
void lower ()
 
void moveTo (const QPoint &newpos)
 
void moveTo (int x, int y)
 
int opacity () const
 
QPoint pos () const
 
void putInCanvas (KGameCanvasAbstract *canvas)
 
void raise ()
 
void setAnimated (bool a)
 
void setOpacity (int o)
 
void setVisible (bool v)
 
void show ()
 
void stackOver (KGameCanvasItem *ref)
 
void stackUnder (KGameCanvasItem *ref)
 
KGameCanvasWidget * topLevelCanvas () const
 
bool visible () const
 

Detailed Description

A tiled pixmap (brush).

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

Deprecated:
For new applications, use Qt's Graphics View framework or Qt Quick.

Definition at line 397 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 712 of file kgamecanvas.cpp.

KGameCanvasTiledPixmap::KGameCanvasTiledPixmap ( KGameCanvasAbstract *  canvas = NULL)

Constructor, creating with an empty pixmap.

Definition at line 722 of file kgamecanvas.cpp.

KGameCanvasTiledPixmap::~KGameCanvasTiledPixmap ( )
virtual

Definition at line 730 of file kgamecanvas.cpp.

Member Function Documentation

virtual bool KGameCanvasTiledPixmap::layered ( ) const
inlinevirtual

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 438 of file kgamecanvas.h.

bool KGameCanvasTiledPixmap::moveOrigin ( )
inline

If the origin is moved.

Definition at line 431 of file kgamecanvas.h.

QPoint KGameCanvasTiledPixmap::origin ( ) const
inline

The origin.

Definition at line 425 of file kgamecanvas.h.

void KGameCanvasTiledPixmap::paint ( QPainter *  p)
virtual

Override this function to draw the item with the painter.

Implements KGameCanvasItem.

Definition at line 764 of file kgamecanvas.cpp.

QPixmap KGameCanvasTiledPixmap::pixmap ( ) const
inline

Returns the pixmap.

Definition at line 416 of file kgamecanvas.h.

QRect KGameCanvasTiledPixmap::rect ( ) const
virtual

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

Implements KGameCanvasItem.

Definition at line 772 of file kgamecanvas.cpp.

void KGameCanvasTiledPixmap::setMoveOrigin ( bool  move_orig)

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

Definition at line 755 of file kgamecanvas.cpp.

void KGameCanvasTiledPixmap::setOrigin ( const QPoint &  size)

Sets the origin of the tiles.

Definition at line 746 of file kgamecanvas.cpp.

void KGameCanvasTiledPixmap::setPixmap ( const QPixmap &  pixmap)

Sets the pixmap of the tile.

Definition at line 734 of file kgamecanvas.cpp.

void KGameCanvasTiledPixmap::setSize ( const QSize &  size)

Sets the size.

Definition at line 740 of file kgamecanvas.cpp.


The documentation for this class was generated from the following files:
  • kgamecanvas.h
  • kgamecanvas.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:50 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkdegames/libkdegamesprivate

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

kdegames API Reference

Skip menu "kdegames API Reference"
  • granatier
  • kapman
  • kblackbox
  • kgoldrunner
  • kigo
  • kmahjongg
  • KShisen
  • ksquares
  • libkdegames
  •   highscore
  •   libkdegamesprivate
  •     kgame
  • libkmahjongg
  • palapeli
  •   libpala

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal