NAMEQCanvasPixmap - Pixmaps for QCanvasSprites
SYNOPSIS#include <qcanvas.h> Inherits QPixmap. Public Members QCanvasPixmap ( const QString & datafilename ) QCanvasPixmap ( const QImage & image ) QCanvasPixmap ( const QPixmap & pm, const QPoint & offset ) ~QCanvasPixmap () int offsetX () const int offsetY () const void setOffset ( int x, int y )
DESCRIPTIONThe QCanvasPixmap class provides pixmaps for QCanvasSprites. If you want to show a single pixmap on a QCanvas use a QCanvasSprite with just one pixmap. 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 QImage 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 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(). 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. See also QCanvasPixmapArray, QCanvasItem, QCanvasSprite, Graphics Classes, and Image Processing Classes.
MEMBER FUNCTION DOCUMENTATION
QCANVASPIXMAP::QCANVASPIXMAP ( CONST QSTRING & DATAFILENAME )Constructs a QCanvasPixmap that uses the image stored in datafilename.
QCANVASPIXMAP::QCANVASPIXMAP ( CONST QIMAGE & IMAGE )Constructs a QCanvasPixmap from the image image.
QCANVASPIXMAP::QCANVASPIXMAP ( CONST QPIXMAP & PM, CONST QPOINT & OFFSET )Constructs a QCanvasPixmap from the pixmap pm using the offset offset.
QCANVASPIXMAP::~QCANVASPIXMAP ()Destroys the pixmap.
INT QCANVASPIXMAP::OFFSETX () CONSTReturns the x-offset of the pixmap's hotspot. See also setOffset().
INT QCANVASPIXMAP::OFFSETY () CONSTReturns the y-offset of the pixmap's hotspot. See also setOffset().
VOID QCANVASPIXMAP::SETOFFSET ( INT X, INT Y )Sets the offset of the pixmap's hotspot to (x, y). Warning: Do not call this function if any QCanvasSprites are currently showing this pixmap.
SEE ALSO//doc.trolltech.com/qcanvaspixmap.html //www.trolltech.com/faq/tech.html
COPYRIGHTCopyright 1992-2007 Trolltech ASA, //www.trolltech.com. See the license file included in the distribution for a complete license statement.
AUTHORGenerated automatically from the source code.
BUGSIf you find a bug in Qt, please report it as described in //doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt- email@example.com. Please include the name of the manual page (qcanvaspixmap.3qt) and the Qt version (3.3.8). QCANVASPIXMAP(3)