Search for usage in LXR

KGameCanvasPicture Class Reference

#include <KGameCanvas>

Inheritance diagram for KGameCanvasPicture:

Public Member Functions

 KGameCanvasPicture (const QPicture &picture, KGameCanvasAbstract *canvas=nullptr)
 KGameCanvasPicture (KGameCanvasAbstract *canvas=nullptr)
void paint (QPainter *p) override
QPicture picture () const
QRect rect () const override
void setPicture (const QPicture &picture)
- 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 ()
virtual bool layered () const
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 picture, ie a collection of paint operations.

A KGameCanvasPicture is a picture that can be replayed on the canvas.

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

Definition at line 327 of file kgamecanvas.h.

Constructor & Destructor Documentation

◆ KGameCanvasPicture() [1/2]

KGameCanvasPicture::KGameCanvasPicture ( const QPicture picture,
KGameCanvasAbstract canvas = nullptr 

Constructor, specifying the picture to use.

Definition at line 957 of file kgamecanvas.cpp.

◆ KGameCanvasPicture() [2/2]

KGameCanvasPicture::KGameCanvasPicture ( KGameCanvasAbstract canvas = nullptr)

Constructor, creating with an empty picture.

Definition at line 963 of file kgamecanvas.cpp.

Member Function Documentation

◆ paint()

void KGameCanvasPicture::paint ( QPainter p)

Override this function to draw the item with the painter.

Implements KGameCanvasItem.

Definition at line 980 of file kgamecanvas.cpp.

◆ picture()

QPicture KGameCanvasPicture::picture ( ) const

Returns the picture.

Definition at line 342 of file kgamecanvas.h.

◆ rect()

QRect KGameCanvasPicture::rect ( ) const

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

Implements KGameCanvasItem.

Definition at line 985 of file kgamecanvas.cpp.

◆ setPicture()

void KGameCanvasPicture::setPicture ( const QPicture picture)

Sets the picture of the sprite.

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