QwSpritePixmap Class Reference


A QwSpritePixmap is a sprite frame image More...

#include <QwSpriteField.h>

Inherits QPixmap.

List of all member functions.

Public Members


Detailed Description

A QwSpritePixmap is a sprite frame image

Note that QwSpritePixmap should be considered an internal class at the current time. This will change (as will the interface) once alpha and description support for QImage is clarified.

See also: QwSpritePixmapSequence, QwVirtualSprite and QwSprite.


Member Function Documentation

QwSpritePixmap::QwSpritePixmap (const char* dataname, const char* maskname)

Construct a QwSpritePixmap from two image files.

The QwSpritePixmap is a masked QPixmap used internally by sprite classes.

The dataname file must be a PPM file of the form:

P6
# HOTSPOT x y
...

That is, it must have an additional comment which gives the (x,y) coordinate of the `hotspot' of the image.

The `hotspot' position defines the origin pixel in the image For example, if the hotspot is (10,5), it will be displayed drawn 10 pixels to the left of and 5 pixels above the actual (x,y) coordinate of the sprite.

The maskname can be any monochrome image format, such as PBM. No special comments in the file are needed or recognized.

QwSpritePixmap::~QwSpritePixmap ()

Deletes any collision mask.


This file is part of a class set, copyright © 1995-96 Warwick Allison

It was generated from the following files:


Generated at 15:00, 1996/10/21