diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-07-10 15:24:15 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-07-10 15:24:15 -0500 |
commit | bd0f3345a938b35ce6a12f6150373b0955b8dd12 (patch) | |
tree | 7a520322212d48ebcb9fbe1087e7fca28b76185c /doc/man/man3/qcanvaspixmap.3qt | |
download | qt3-bd0f3345a938b35ce6a12f6150373b0955b8dd12.tar.gz qt3-bd0f3345a938b35ce6a12f6150373b0955b8dd12.zip |
Add Qt3 development HEAD version
Diffstat (limited to 'doc/man/man3/qcanvaspixmap.3qt')
-rw-r--r-- | doc/man/man3/qcanvaspixmap.3qt | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/doc/man/man3/qcanvaspixmap.3qt b/doc/man/man3/qcanvaspixmap.3qt new file mode 100644 index 0000000..6bb557b --- /dev/null +++ b/doc/man/man3/qcanvaspixmap.3qt @@ -0,0 +1,100 @@ +'\" t +.TH QCanvasPixmap 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the +.\" license file included in the distribution for a complete license +.\" statement. +.\" +.ad l +.nh +.SH NAME +QCanvasPixmap \- Pixmaps for QCanvasSprites +.SH SYNOPSIS +\fC#include <qcanvas.h>\fR +.PP +Inherits QPixmap. +.PP +.SS "Public Members" +.in +1c +.ti -1c +.BI "\fBQCanvasPixmap\fR ( const QString & datafilename )" +.br +.ti -1c +.BI "\fBQCanvasPixmap\fR ( const QImage & image )" +.br +.ti -1c +.BI "\fBQCanvasPixmap\fR ( const QPixmap & pm, const QPoint & offset )" +.br +.ti -1c +.BI "\fB~QCanvasPixmap\fR ()" +.br +.ti -1c +.BI "int \fBoffsetX\fR () const" +.br +.ti -1c +.BI "int \fBoffsetY\fR () const" +.br +.ti -1c +.BI "void \fBsetOffset\fR ( int x, int y )" +.br +.in -1c +.SH DESCRIPTION +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. +.PP +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). +.PP +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. +.PP +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. +.SH MEMBER FUNCTION DOCUMENTATION +.SH "QCanvasPixmap::QCanvasPixmap ( const QString & datafilename )" +Constructs a QCanvasPixmap that uses the image stored in \fIdatafilename\fR. +.SH "QCanvasPixmap::QCanvasPixmap ( const QImage & image )" +Constructs a QCanvasPixmap from the image \fIimage\fR. +.SH "QCanvasPixmap::QCanvasPixmap ( const QPixmap & pm, const QPoint & offset )" +Constructs a QCanvasPixmap from the pixmap \fIpm\fR using the offset \fIoffset\fR. +.SH "QCanvasPixmap::~QCanvasPixmap ()" +Destroys the pixmap. +.SH "int QCanvasPixmap::offsetX () const" +Returns the x-offset of the pixmap's hotspot. +.PP +See also setOffset(). +.SH "int QCanvasPixmap::offsetY () const" +Returns the y-offset of the pixmap's hotspot. +.PP +See also setOffset(). +.SH "void QCanvasPixmap::setOffset ( int x, int y )" +Sets the offset of the pixmap's hotspot to (\fIx\fR, \fIy\fR). +.PP +\fBWarning:\fR Do not call this function if any QCanvasSprites are +currently showing this pixmap. + +.SH "SEE ALSO" +.BR http://doc.trolltech.com/qcanvaspixmap.html +.BR http://www.trolltech.com/faq/tech.html +.SH COPYRIGHT +Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the +license file included in the distribution for a complete license +statement. +.SH AUTHOR +Generated automatically from the source code. +.SH BUGS +If you find a bug in Qt, please report it as described in +.BR http://doc.trolltech.com/bughowto.html . +Good bug reports help us to help you. Thank you. +.P +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. +.P +If you find errors in this manual page, please report them to +.BR qt-bugs@trolltech.com . +Please include the name of the manual page (qcanvaspixmap.3qt) and the Qt +version (3.3.8). |