![]() ![]() |
An array of QCanvasPixmap to have multiple frames for animation. More...
#include <qcanvas.h>
This allows sprite objects to have multiple frames for animation.
QCanvasPixmaps for sprite objects are collected into QCanvasPixmapArrays, which are the set of images a sprite will use, indexed by the sprite's frame. This allows sprites to simply have animated forms.
Constructs a null array. You should call readPixmaps() before using it further.
Constructs a QCanvasPixmapArray from QPixmaps.
Constructs a QCanvasPixmapArray from files. See readPixmaps() for details.
Destructs the pixmap array.
Returns the length of the array.
Returns the i-th pixmap in the array.
Constructor failure check.
When testing sprite collision detection the default is to use the image mask of the sprite. By using readCollisionMasks(), an alternate mask can be used. The images must be 1-bit deep.
Sets the array to fc pixmaps, read from files.
If fc is not 0, the filenames should contain a "%1", strings such as "foo%1.png". The actual filenames are formed by replacing the %1 with each integer from 0 to fc-1, with leading zeroes sufficient for 4 digits. eg. foo0000.png, foo0001.png, foo0002.png, etc.
Replaces the i-th pixmap by p. Note that p becomes owned by the array - it will be deleted later.
If i is more than count()-1, the array is extended to make room.
Search the documentation, FAQ, qt-interest archive and more (uses
www.trolltech.com):
This file is part of the Qt toolkit, copyright © 1995-2000 Trolltech, all rights reserved.
Copyright İ 2000 Trolltech | Trademarks | Qt version 2.3.1
|