The QCanvasPixmap class provides a pixmap with an offset. More...
#include <qcanvas.h>
Inherits QPixmap.
QImage has an offset or "hot spot", but QPixmap does not. This class adds the notion of an offset to QPixmap as this is very useful for the canvas sprites where QCanvasPixmap is used. It also keeps a copy of the display mask for use in collision detection.
Note that PNG format files already have support for an offset.
See also QCanvasPixmapArray, QCanvasItem and QCanvasSprite.
Constructs a QCanvasPixmap from an image.
Constructs a QCanvasPixmap from a pixmap and an offset.
Constructs a QCanvasPixmap from an image file by loading it.
Destructs the pixmap.
Returns the X-offset of the pixmap.
See also setOffset().
Returns the Y-offset of the pixmap.
See also setOffset().
Sets the offset to (x, y).
The offset position or "hot spot" defines the origin pixel in the image For example, if the offset 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.
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.2.1
|