KGameCanvasTiledPixmap

Search for usage in LXR

KGameCanvasTiledPixmap Class Reference

#include <KGameCanvas>

Inheritance diagram for KGameCanvasTiledPixmap:

Public Member Functions

 KGameCanvasTiledPixmap (const QPixmap &pixmap, const QSize &size, const QPoint &origin, bool move_orig, KGameCanvasAbstract *canvas=nullptr)
 
 KGameCanvasTiledPixmap (KGameCanvasAbstract *canvas=nullptr)
 
bool layered () const override
 
bool moveOrigin ()
 
QPoint origin () const
 
void paint (QPainter *p) override
 
QPixmap pixmap () const
 
QRect rect () const override
 
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=nullptr)
 
QPoint absolutePosition () const
 
virtual void advance (int msecs)
 
bool animated () const
 
KGameCanvasAbstractcanvas () 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)
 
KGameCanvasWidgettopLevelCanvas () 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 420 of file kgamecanvas.h.

Constructor & Destructor Documentation

◆ KGameCanvasTiledPixmap() [1/2]

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

Constructor, specifying the pixmap and the parameters to use.

Definition at line 725 of file kgamecanvas.cpp.

◆ KGameCanvasTiledPixmap() [2/2]

KGameCanvasTiledPixmap::KGameCanvasTiledPixmap ( KGameCanvasAbstract canvas = nullptr)
explicit

Constructor, creating with an empty pixmap.

Definition at line 734 of file kgamecanvas.cpp.

Member Function Documentation

◆ layered()

bool KGameCanvasTiledPixmap::layered ( ) const
inlineoverridevirtual

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

◆ moveOrigin()

bool KGameCanvasTiledPixmap::moveOrigin ( )
inline

If the origin is moved.

Definition at line 459 of file kgamecanvas.h.

◆ origin()

QPoint KGameCanvasTiledPixmap::origin ( ) const
inline

The origin.

Definition at line 450 of file kgamecanvas.h.

◆ paint()

void KGameCanvasTiledPixmap::paint ( QPainter p)
overridevirtual

Override this function to draw the item with the painter.

Implements KGameCanvasItem.

Definition at line 777 of file kgamecanvas.cpp.

◆ pixmap()

QPixmap KGameCanvasTiledPixmap::pixmap ( ) const
inline

Returns the pixmap.

Definition at line 438 of file kgamecanvas.h.

◆ rect()

QRect KGameCanvasTiledPixmap::rect ( ) const
overridevirtual

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

Implements KGameCanvasItem.

Definition at line 785 of file kgamecanvas.cpp.

◆ setMoveOrigin()

void KGameCanvasTiledPixmap::setMoveOrigin ( bool  move_orig)

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

Definition at line 768 of file kgamecanvas.cpp.

◆ setOrigin()

void KGameCanvasTiledPixmap::setOrigin ( const QPoint size)

Sets the origin of the tiles.

Definition at line 760 of file kgamecanvas.cpp.

◆ setPixmap()

void KGameCanvasTiledPixmap::setPixmap ( const QPixmap pixmap)

Sets the pixmap of the tile.

Definition at line 746 of file kgamecanvas.cpp.

◆ setSize()

void KGameCanvasTiledPixmap::setSize ( const QSize size)

Sets the size.

Definition at line 753 of file kgamecanvas.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sun Dec 4 2022 03:50:22 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.