![]() |
| ||
Classes - Annotated - Tree - Functions - Home - Structure |
The QCanvasPixmap class provides a pixmap in a QCanvas. More...
#include <qcanvas.h>
Inherits QPixmap.
The pixmap is a QPixmap and can only be set in the constructor. There are three different constructors, one taking a QPixmap, one a QImage and one a file name that refers to a file in any supported file format (see QImageIO).
Since QCanvasSprite needs (and other uses of pixmaps often need) a hot spot, QCanvasPixmap provides one. When you create the QCanvasPixmap from a PNG file or from a QImage that has a QImage::offset(), the offset() is initialized appropriately, otherwise the constructor leaves it at (0,0). You can set it later using setOffset().
Note that for QCanvasPixmap objects created by a QCanvasSprite, the position of each QCanvasPixmap object is set so that the hot spot stays in the same position.
Like any other canvas item canvas pixmaps can be moved with QCanvasItem::move() and QCanvasItem::moveBy(), or by setting coordinates with QCanvasItem::setX(), QCanvasItem::setY() and QCanvasItem::setZ().
See also QCanvasPixmapArray, QCanvasItem and QCanvasSprite.
Returns the X-offset of the pixmap's hot spot.
See also setOffset().
Returns the Y-offset of the pixmap's hot spot.
See also setOffset().
Sets the offset of the pixmap's hot spot to (x, y).
Search the documentation, FAQ, qt-interest archive and more (uses
www.trolltech.com):
This file is part of the Qt toolkit, copyright © 1995-2001 Trolltech, all rights reserved.
Copyright © 2001 Trolltech | Trademarks | Qt version 3.0.0-beta2
|