qcanvaspixmap.3qt
来自「Qt/Embedded是一个多平台的C++图形用户界面应用程序框架」· 3QT 代码 · 共 83 行
3QT
83 行
.TH QCanvasPixmap 3qt "10 November 2000" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2000 Trolltech AS. All rights reserved. See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQCanvasPixmap \- Pixmap with an offset<h1 align=center>QCanvasPixmap Class Reference.br<small>[ canvas module ]</small></h1>.br.PP\fC#include <qcanvas.h>\fR.PPInherits 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 &, QPoint hotspot ) ".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 DESCRIPTIONThe QCanvasPixmap class provides a pixmap with an offset..PPQImage 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..PPNote that PNG format files already have support for an offset..PPSee also QCanvasPixmapArray, QCanvasItem and QCanvasSprite..SH MEMBER FUNCTION DOCUMENTATION.SH "QCanvasPixmap::QCanvasPixmap ( const QImage & image )"Constructs a QCanvasPixmap from an image..SH "QCanvasPixmap::QCanvasPixmap ( const QPixmap & pm, QPoint offset )"Constructs a QCanvasPixmap from a pixmap and an offset..SH "QCanvasPixmap::QCanvasPixmap ( const QString & datafilename )"Constructs a QCanvasPixmap from an image file by loading it..SH "QCanvasPixmap::~QCanvasPixmap ()"Destructs the pixmap..SH "int QCanvasPixmap::offsetX () const"Returns the X-offset of the pixmap..PPSee also setOffset()..SH "int QCanvasPixmap::offsetY () const"Returns the Y-offset of the pixmap..PPSee also setOffset()..SH "void QCanvasPixmap::setOffset ( int x, int y )"Sets the offset to (\fIx, y).\fR.PPThe offset position or "hot spot" defines the origin pixel in the imageFor example, if the offset is (10,5), it will be displayeddrawn 10 pixels to the left of and 5 pixels above the actual(x,y) coordinate of the sprite..SH "SEE ALSO".BR http://doc.trolltech.com/qcanvaspixmap.html.SH COPYRIGHTCopyright 1992-2000 Trolltech AS, http://www.trolltech.com/. See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?