# QwImageSpriteField Class Reference

A QwSpriteField with a background image. More...

`#include <QwSpriteField.h>`

Inherits QwSpriteField.

List of all member functions.

## Public Members

- QwImageSpriteField ( const char * imagefile, int w, int h, int chunksize=16, int maxclusters=100 )
- QwImageSpriteField ( QPixmap pm, int w, int h, int chunksize=16, int maxclusters=100 )
- virtual ~QwImageSpriteField ()

## Protected Members

- virtual void drawBackground ( QPainter &, const QRect & area )

## Detailed Description

A QwSpriteField with a background image.

Although it is not very useful to provide a complex background drawing method for a QwSpriteField (since redraw efficiency is achieved by sprites, not static background graphics), if your application requires only a simple repeating background image, this class will suffice.

This class is also intended as documentation-by-example for the QwSpriteField::drawBackground method.

## Member Function Documentation

### QwImageSpriteField::QwImageSpriteField ( QPixmap pm, int w, int h, int chunksize=16, int maxclusters=100 )

Construct an QwImageSpriteField which uses the given image as the background image.

### QwImageSpriteField::QwImageSpriteField ( const char * filename, int w, int h, int chunksize=16, int maxclusters=100 )

Construct an QwImageSpriteField which uses the given image file as the background image. Any Qt-supported image format may be used.

### QwImageSpriteField::~QwImageSpriteField () `[virtual]`

Does nothing.

### void QwImageSpriteField::drawBackground ( QPainter & painter, const QRect & area ) `[virtual protected]`

Reimplements QwSpriteField::drawBackground to draw the image as the background.

This file is copyright © 1995-97 Warwick Allison.

It was generated from the following files:

- QwSpriteField.h
- QwSpriteField-double.cpp
- QwSpriteField-int.cpp
- QwSpriteField-mobdouble.cpp
- QwSpriteField-mobint.cpp
- QwSpriteField-template.cpp
- QwSpriteField.cpp