KGameCanvasRenderedPixmap

Search for usage in LXR

KGameCanvasRenderedPixmap Class Reference

#include <KGameCanvas>

Inheritance diagram for KGameCanvasRenderedPixmap:

Public Member Functions

 KGameCanvasRenderedPixmap (KGameRenderer *renderer, const QString &spriteKey, KGameCanvasAbstract *canvas=nullptr)
 
- Public Member Functions inherited from KGameCanvasPixmap
 KGameCanvasPixmap (const QPixmap &pixmap, KGameCanvasAbstract *canvas=nullptr)
 
 KGameCanvasPixmap (KGameCanvasAbstract *canvas=nullptr)
 
bool layered () const override
 
void paint (QPainter *p) override
 
QPixmap pixmap () const
 
QRect rect () const override
 
void setPixmap (const QPixmap &pixmap)
 
- 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
 
- Public Member Functions inherited from KGameRendererClient
 KGameRendererClient (KGameRenderer *renderer, const QString &spriteKey)
 
QHash< QColor, QColorcustomColors () const
 
int frame () const
 
int frameCount () const
 
KGameRendererrenderer () const
 
QSize renderSize () const
 
void setCustomColors (const QHash< QColor, QColor > &customColors)
 
void setFrame (int frame)
 
void setRenderSize (const QSize &renderSize)
 
void setSpriteKey (const QString &spriteKey)
 
QString spriteKey () const
 

Protected Member Functions

void receivePixmap (const QPixmap &pixmap) override
 

Detailed Description

A sprite pixmap from KGameRenderer.

This canvas item behaves like KGameCanvasPixmap, but the pixmaps are served from a KGameRenderer. This class exists solely for the purpose of porting existing applications to KGameRenderer.

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

Definition at line 403 of file kgamecanvas.h.

Member Function Documentation

◆ receivePixmap()

void KGameCanvasRenderedPixmap::receivePixmap ( const QPixmap pixmap)
overrideprotectedvirtual

This method is called when the KGameRenderer has provided a new pixmap for this client (esp.

after theme changes and after calls to setFrame(), setRenderSize() and setSpriteKey()).

Implements KGameRendererClient.

Definition at line 717 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.