1QCanvasPixmap(3qt)                                          QCanvasPixmap(3qt)
2
3
4

NAME

6       QCanvasPixmap - Pixmaps for QCanvasSprites
7

SYNOPSIS

9       #include <qcanvas.h>
10
11       Inherits QPixmap.
12
13   Public Members
14       QCanvasPixmap ( const QString & datafilename )
15       QCanvasPixmap ( const QImage & image )
16       QCanvasPixmap ( const QPixmap & pm, const QPoint & offset )
17       ~QCanvasPixmap ()
18       int offsetX () const
19       int offsetY () const
20       void setOffset ( int x, int y )
21

DESCRIPTION

23       The QCanvasPixmap class provides pixmaps for QCanvasSprites.
24
25       If you want to show a single pixmap on a QCanvas use a QCanvasSprite
26       with just one pixmap.
27
28       When pixmaps are inserted into a QCanvasPixmapArray they are held as
29       QCanvasPixmaps. QCanvasSprites are used to show pixmaps on QCanvases
30       and hold their pixmaps in a QCanvasPixmapArray. If you retrieve a frame
31       (pixmap) from a QCanvasSprite it will be returned as a QCanvasPixmap.
32
33       The pixmap is a QPixmap and can only be set in the constructor. There
34       are three different constructors, one taking a QPixmap, one a QImage
35       and one a file name that refers to a file in any supported file format
36       (see QImageIO).
37
38       QCanvasPixmap can have a hotspot which is defined in terms of an (x, y)
39       offset. When you create a QCanvasPixmap from a PNG file or from a
40       QImage that has a QImage::offset(), the offset() is initialized
41       appropriately, otherwise the constructor leaves it at (0, 0). You can
42       set it later using setOffset(). When the QCanvasPixmap is used in a
43       QCanvasSprite, the offset position is the point at QCanvasItem::x() and
44       QCanvasItem::y(), not the top-left corner of the pixmap.
45
46       Note that for QCanvasPixmap objects created by a QCanvasSprite, the
47       position of each QCanvasPixmap object is set so that the hotspot stays
48       in the same position.
49
50       See also QCanvasPixmapArray, QCanvasItem, QCanvasSprite, Graphics
51       Classes, and Image Processing Classes.
52

MEMBER FUNCTION DOCUMENTATION

QCanvasPixmap::QCanvasPixmap ( const QString & datafilename )

55       Constructs a QCanvasPixmap that uses the image stored in datafilename.
56

QCanvasPixmap::QCanvasPixmap ( const QImage & image )

58       Constructs a QCanvasPixmap from the image image.
59

QCanvasPixmap::QCanvasPixmap ( const QPixmap & pm, const QPoint & offset )

61       Constructs a QCanvasPixmap from the pixmap pm using the offset offset.
62

QCanvasPixmap::~QCanvasPixmap ()

64       Destroys the pixmap.
65

int QCanvasPixmap::offsetX () const

67       Returns the x-offset of the pixmap's hotspot.
68
69       See also setOffset().
70

int QCanvasPixmap::offsetY () const

72       Returns the y-offset of the pixmap's hotspot.
73
74       See also setOffset().
75

void QCanvasPixmap::setOffset ( int x, int y )

77       Sets the offset of the pixmap's hotspot to (x, y).
78
79       Warning: Do not call this function if any QCanvasSprites are currently
80       showing this pixmap.
81
82

SEE ALSO

84       http://doc.trolltech.com/qcanvaspixmap.html
85       http://www.trolltech.com/faq/tech.html
86
88       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
89       license file included in the distribution for a complete license
90       statement.
91

AUTHOR

93       Generated automatically from the source code.
94

BUGS

96       If you find a bug in Qt, please report it as described in
97       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
98       help you. Thank you.
99
100       The definitive Qt documentation is provided in HTML format; it is
101       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
102       web browser. This man page is provided as a convenience for those users
103       who prefer man pages, although this format is not officially supported
104       by Trolltech.
105
106       If you find errors in this manual page, please report them to qt-
107       bugs@trolltech.com.  Please include the name of the manual page
108       (qcanvaspixmap.3qt) and the Qt version (3.3.8).
109
110
111
112Trolltech AS                    2 February 2007             QCanvasPixmap(3qt)
Impressum