⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qregion.3qt

📁 tmark1.11:用于生成QT/EMBEDDED应用工程的Markfile文件
💻 3QT
字号:
.TH QRegion 3qt "6 July 1999" "Troll Tech AS" \" -*- nroff -*-.\" Copyright 1992-1999 Troll Tech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQRegion \- Clip region for a painter.SH SYNOPSIS.br.PP\fC#include <qregion.h>\fR.PP.SS "Public Members".in +1c.ti -1c.BI "enum \fBRegionType\fR { Rectangle, Ellipse }".br.ti -1c.BI "\fBQRegion\fR ()".br.ti -1c.BI "\fBQRegion\fR ( int " "x" ", int " "y" ", int " "w" ", int " "h" ", RegionType = Rectangle )".br.ti -1c.BI "\fBQRegion\fR ( const QRect &, RegionType = Rectangle )".br.ti -1c.BI "\fBQRegion\fR ( const QPointArray &, bool " "winding" "=FALSE )".br.ti -1c.BI "\fBQRegion\fR ( const QRegion & )".br.ti -1c.BI "\fBQRegion\fR ( const QBitmap & )".br.ti -1c.BI "\fB~QRegion\fR ()".br.ti -1c.BI "QRegion& \fBoperator=\fR ( const QRegion & )".br.ti -1c.BI "bool \fBisNull\fR () const".br.ti -1c.BI "bool \fBisEmpty\fR () const".br.ti -1c.BI "bool \fBcontains\fR ( const QPoint & p ) const".br.ti -1c.BI "bool \fBcontains\fR ( const QRect & r ) const".br.ti -1c.BI "void \fBtranslate\fR ( int " "dx" ", int dy )".br.ti -1c.BI "QRegion \fBunite\fR ( const QRegion & ) const".br.ti -1c.BI "QRegion \fBintersect\fR ( const QRegion & ) const".br.ti -1c.BI "QRegion \fBsubtract\fR ( const QRegion & ) const".br.ti -1c.BI "QRegion \fBeor\fR ( const QRegion & ) const".br.ti -1c.BI "QRect \fBboundingRect\fR () const".br.ti -1c.BI "QArray<QRect> \fBrects\fR () const".br.ti -1c.BI "QRegion \fBoperator|\fR ( const QRegion & ) const".br.ti -1c.BI "QRegion \fBoperator+\fR ( const QRegion & ) const".br.ti -1c.BI "QRegion \fBoperator&\fR ( const QRegion & ) const".br.ti -1c.BI "QRegion \fBoperator-\fR ( const QRegion & ) const".br.ti -1c.BI "QRegion \fBoperator^\fR ( const QRegion & ) const".br.ti -1c.BI "QRegion& \fBoperator|=\fR ( const QRegion & )".br.ti -1c.BI "QRegion& \fBoperator+=\fR ( const QRegion & )".br.ti -1c.BI "QRegion& \fBoperator&=\fR ( const QRegion & )".br.ti -1c.BI "QRegion& \fBoperator-=\fR ( const QRegion & )".br.ti -1c.BI "QRegion& \fBoperator^=\fR ( const QRegion & )".br.ti -1c.BI "bool \fBoperator==\fR ( const QRegion & ) const".br.ti -1c.BI "bool \fBoperator!=\fR ( const QRegion & r ) const".br.in -1c.SH RELATED FUNCTION DOCUMENTATION(Note that these are not member functions.).in +1c.ti -1c.BI "QDataStream & \fBoperator>>\fR (QDataStream & " "s" ", QRegion & " "r" ")".br.ti -1c.BI "QDataStream & \fBoperator<<\fR (QDataStream & " "s" ", const QRegion & " "r" ")".br.in -1c.SH DESCRIPTIONThe QRegion class specifies a clip region for a painter..PPA region can be a rectangle, an ellipse, a polygon or a combination of these..PPRegions are combined by creating a new region which is a union, intersection or difference between any two regions..PPThe region XOR operation is defined as:.PP.nf.br    a XOR b = (a UNION b) - (a INTERSECTION b).fi.PPExample of using complex regions:.PP.nf.br    void MyWidget::paintEvent( QPaintEvent * ).br    {.br        QPainter p;                             // our painter.br        QRegion r1( QRect(100,100,200,80),      // r1 = elliptic region.br                    QRegion::Ellipse );.br        QRegion r2( QRect(100,120,90,30) );     // r2 = rectangular region.br        QRegion r3 = r1.intersect( r2 );        // r3 = intersection.br        p.begin( this );                        // start painting widget.br        p.setClipRegion( r3 );                  // set clip region.br        ...                                     // paint clipped graphics.br        p.end();                                // painting done.br    }.fi.PPSee also: QPainter::setClipRegion() and QPainter::setClipRect()..SH MEMBER FUNCTION DOCUMENTATION.SH "QRegion::QRegion ()"Constructs an null region..PPSee also: isNull()..SH "QRegion::QRegion ( const QBitmap & bm )"Constructs a region from a bitmap..PPThe pixels in \fIbm\fR that are color1 will be part of the region as if each was a 1 by 1 rectangle..SH "QRegion::QRegion ( const QPointArray & a, bool winding=FALSE )"Constructs a polygon region from the point array \fIa.\fR.PPIf \fIwinding\fR is TRUE, the polygon region uses the winding algorithm, otherwise the alternative (even-odd) algorithm will be used..SH "QRegion::QRegion ( const QRect & r, RegionType t = Rectangle )"Constructs a rectangular or elliptic region..PPArguments:.TP\fIr\fR is the region rectangle..TP\fIt\fR is the region type: QRegion::Rectangle (default) or QRegion::Ellipse..SH "QRegion::QRegion ( const QRegion & r )"Constructs a region which is a shallow copy of \fIr.\fR.SH "QRegion::QRegion ( int x, int y, int w, int h, RegionType t = Rectangle )"Constructs a rectangular or elliptic region..PP\fIx, y, w,\fR and \fIh\fR specify the region rectangle. \fIt\fR is the region type: QRegion::Rectangle (default) or QRegion::Ellipse..SH "QRegion::~QRegion ()"Destroys the region..SH "QRect QRegion::boundingRect () const"Returns the bounding rectangle of this region. An empty region gives a null rectangle..SH "bool QRegion::contains ( const QPoint & p ) const"Returns TRUE if the region contains the point \fIp,\fR or FALSE if \fIp\fR is outside the region..SH "bool QRegion::contains ( const QRect & r ) const"Returns TRUE if the region contains the rectangle \fIr,\fR or FALSE if \fIr\fR is outside the region..SH "QRegion QRegion::eor ( const QRegion & r ) const"Returns a region which is this region XOR \fIr.\fR.SH "QRegion QRegion::intersect ( const QRegion & r ) const"Returns a region which is the intersection of this region and \fIr.\fR.SH "bool QRegion::isEmpty () const"Returns TRUE if the region is empty, or FALSE if it is non-empty..PPExample:.PP.nf.br    QRegion r1( 10, 10, 20, 20 );.br    QRegion r2( 40, 40, 20, 20 );.br    QRegion r3;.br    r1.isNull();                // FALSE.br    r1.isEmpty();               // FALSE.br    r3.isNull();                // TRUE.br    r3.isEmpty();               // TRUE.br    r3 = r1.intersect( r2 );    // r3 = intersection of r1 and r2.br    r3.isNull();                // FALSE.br    r3.isEmpty();               // TRUE.br    r3 = r1.unite( r2 );        // r3 = union of r1 and r2.br    r3.isNull();                // FALSE.br    r3.isEmpty();               // FALSE.fi.PPSee also: isNull()..SH "bool QRegion::isNull () const"Returns TRUE if the region is a null region, otherwise FALSE..PPA null region is a region that has not been initialized. The documentation for isEmpty() contains an example that shows how to use isNull() and isEmpty()..PPSee also: isEmpty()..SH "bool QRegion::operator!= ( const QRegion & r ) const"Returns TRUE if the region is different from \fIr,\fR or FALSE if the regions are equal..SH "QRegion QRegion::operator& ( const QRegion & r ) const"Equivalent to intersect(r)..SH "QRegion& QRegion::operator&= ( const QRegion & r )"Equivalent to *this = *this & r..SH "QRegion QRegion::operator+ ( const QRegion & r ) const"Equivalent to unite(r) and operator|..SH "QRegion& QRegion::operator+= ( const QRegion & r )"Equivalent to *this = *this + r..SH "QRegion QRegion::operator- ( const QRegion & r ) const"Equivalent to subtract(r)..SH "QRegion& QRegion::operator-= ( const QRegion & r )"Equivalent to *this = *this - r..SH "QRegion & QRegion::operator= ( const QRegion & r )"Assigns a shallow copy of \fIr\fR to this region and returns a reference to the region..SH "bool QRegion::operator== ( const QRegion & r ) const"Returns TRUE if the region is equal to \fIr,\fR or FALSE if the regions are different..SH "QRegion QRegion::operator^ ( const QRegion & r ) const"Equivalent to eor(r)..SH "QRegion& QRegion::operator^= ( const QRegion & r )"Equivalent to *this = *this ^ r..SH "QRegion QRegion::operator| ( const QRegion & r ) const"Equivalent to unite(r) and operator+..SH "QRegion& QRegion::operator|= ( const QRegion & r )"Equivalent to *this = *this | r..SH "QArray<QRect> QRegion::rects () const"Returns an array of the rectangles that make up the region. The rectangles are non-overlapping. The region is formed by the union of all these rectangles..SH "QRegion QRegion::subtract ( const QRegion & r ) const"Returns a region which is \fIr\fR subtracted from this region..SH "void QRegion::translate ( int dx, int dy )"Translates the region \fIdx\fR along the X axis and \fIdy\fR along the Y axis..SH "QRegion QRegion::unite ( const QRegion & r ) const"Returns a region which is the union of this region and \fIr.\fR.SH RELATED FUNCTION DOCUMENTATION.SH "QDataStream & operator>> (QDataStream & s, QRegion & r)"Reads a region from the stream and returns a reference to the stream..SH "QDataStream & operator<< (QDataStream & s, const QRegion & r)"Writes a region to the stream and returns a reference to the stream..SH "SEE ALSO".BR http://www.troll.no/qt/qregion.html.SH COPYRIGHTCopyright 1992-1999 Troll Tech AS.  See the license file included inthe distribution for a complete license statement..SH AUTHORGenerated automatically from the source code.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -