The QCanvasPixmap class provides pixmaps for QCanvasSprites.
.PP
If you want to show a single pixmap on a QCanvas use a QCanvasSprite with just one pixmap.
.PP
When pixmaps are inserted into a QCanvasPixmapArray they are held as QCanvasPixmaps. QCanvasSprites are used to show pixmaps on QCanvases and hold their pixmaps in a QCanvasPixmapArray. If you retrieve a frame (pixmap) from a QCanvasSprite it will be returned as a QCanvasPixmap.
The pixmap is a QPixmap and can only be set in the constructor. There are three different constructors, one taking a QPixmap, one a TQImage and one a file name that refers to a file in any supported file format (see QImageIO).
QCanvasPixmap can have a hotspot which is defined in terms of an (x, y) offset. When you create a QCanvasPixmap from a PNG file or from a TQImage that has a TQImage::offset(), the offset() is initialized appropriately, otherwise the constructor leaves it at (0, 0). You can set it later using setOffset(). When the QCanvasPixmap is used in a QCanvasSprite, the offset position is the point at QCanvasItem::x() and QCanvasItem::y(), not the top-left corner of the pixmap.
Note that for QCanvasPixmap objects created by a QCanvasSprite, the position of each QCanvasPixmap object is set so that the hotspot stays in the same position.
.PP
See also QCanvasPixmapArray, QCanvasItem, QCanvasSprite, Graphics Classes, and Image Processing Classes.