QCanvasPixmapArray(3qt)

NAME
QCanvasPixmapArray - An array of QCanvasPixmap to have multiple frames for animation <h1 align=center>QCanvasPixmapArray Class Reference
<small>[ canvas module ]</small></h1>

#include <qcanvas.h>

  Public Members
QCanvasPixmapArray ()
QCanvasPixmapArray ( const QString & datafilenamepattern, int framecount=0 )
QCanvasPixmapArray ( QList<QPixmap>, QList<QPoint> hotspots )
~QCanvasPixmapArray ()
bool readPixmaps ( const QString & datafilenamepattern, int framecount=0 )
bool readCollisionMasks ( const QString & filenamepattern )
int operator! ()
QCanvasPixmap* image ( int i ) const
void setImage ( int i, QCanvasPixmap * p )
uint count () const

DESCRIPTION
An array of QCanvasPixmap to have multiple frames for animation.

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.

MEMBER FUNCTION DOCUMENTATION

QCanvasPixmapArray::QCanvasPixmapArray ()
Constructs a null array. You should call readPixmaps() before using it further.

QCanvasPixmapArray::QCanvasPixmapArray ( QList<QPixmap> list, QList<QPoint> hotspots )
Constructs a QCanvasPixmapArray from QPixmaps.

QCanvasPixmapArray::QCanvasPixmapArray ( const QString & datafilenamepattern, int fc=0 )
Constructs a QCanvasPixmapArray from files.

The fc parameter sets the number of frames to be loaded for this image. 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.

QCanvasPixmapArray::~QCanvasPixmapArray ()
Destructs the pixmap array.

uint QCanvasPixmapArray::count () const
Returns the length of the array.

QCanvasPixmap* QCanvasPixmapArray::image ( int i ) const
Returns the i-th pixmap in the array.

int QCanvasPixmapArray::operator! ()
Constructor failure check.

bool QCanvasPixmapArray::readCollisionMasks ( const QString & fname )
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.

bool QCanvasPixmapArray::readPixmaps ( const QString & datafilenamepattern, int fc=0 )
Read new pixmaps into the array.

void QCanvasPixmapArray::setImage ( int i, QCanvasPixmap * p )
Replaces the i-th pixmap by p. Note that p becomes owned by the array - it will be deleted later.

SEE ALSO
http://doc.trolltech.com/qcanvaspixmaparray.html

COPYRIGHT
Copyright 1992-2000 Trolltech AS, http://www.trolltech.com/. See the license file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.