~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qregion.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/gui/painting/qregion.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: QRegion Class Reference</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QRegion Class Reference</h1>
 
21
<p>The QRegion class specifies a clip region for a painter. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QRegion&gt;</pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
 
23
<ul>
 
24
<li><a href="qregion-members.html">List of all members, including inherited members</a></li>
 
25
<li><a href="qregion-qt3.html">Qt 3 support members</a></li>
 
26
</ul>
 
27
<a name="public-types"></a>
 
28
<h3>Public Types</h3>
 
29
<ul>
 
30
<li><div class="fn"/>enum <b><a href="qregion.html#RegionType-enum">RegionType</a></b> { Rectangle, Ellipse }</li>
 
31
</ul>
 
32
<a name="public-functions"></a>
 
33
<h3>Public Functions</h3>
 
34
<ul>
 
35
<li><div class="fn"/><b><a href="qregion.html#QRegion">QRegion</a></b> ()</li>
 
36
<li><div class="fn"/><b><a href="qregion.html#QRegion-2">QRegion</a></b> ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i>, RegionType <i>t</i> = Rectangle )</li>
 
37
<li><div class="fn"/><b><a href="qregion.html#QRegion-3">QRegion</a></b> ( const QPolygon &amp; <i>a</i>, Qt::FillRule <i>fillRule</i> = Qt::OddEvenFill )</li>
 
38
<li><div class="fn"/><b><a href="qregion.html#QRegion-5">QRegion</a></b> ( const QRegion &amp; <i>r</i> )</li>
 
39
<li><div class="fn"/><b><a href="qregion.html#QRegion-6">QRegion</a></b> ( const QBitmap &amp; <i>bm</i> )</li>
 
40
<li><div class="fn"/><b><a href="qregion.html#QRegion-7">QRegion</a></b> ( const QRect &amp; <i>r</i>, RegionType <i>t</i> = Rectangle )</li>
 
41
<li><div class="fn"/><b><a href="qregion.html#dtor.QRegion">~QRegion</a></b> ()</li>
 
42
<li><div class="fn"/>QRect <b><a href="qregion.html#boundingRect">boundingRect</a></b> () const</li>
 
43
<li><div class="fn"/>bool <b><a href="qregion.html#contains">contains</a></b> ( const QPoint &amp; <i>p</i> ) const</li>
 
44
<li><div class="fn"/>bool <b><a href="qregion.html#contains-2">contains</a></b> ( const QRect &amp; <i>r</i> ) const</li>
 
45
<li><div class="fn"/>QRegion <b><a href="qregion.html#eor">eor</a></b> ( const QRegion &amp; <i>r</i> ) const</li>
 
46
<li><div class="fn"/>Handle <b><a href="qregion.html#handle">handle</a></b> () const</li>
 
47
<li><div class="fn"/>Region <b><a href="qregion.html#handle-2">handle</a></b> () const</li>
 
48
<li><div class="fn"/>void * <b><a href="qregion.html#handle-3">handle</a></b> () const</li>
 
49
<li><div class="fn"/>QRegion <b><a href="qregion.html#intersect">intersect</a></b> ( const QRegion &amp; <i>r</i> ) const</li>
 
50
<li><div class="fn"/>bool <b><a href="qregion.html#isEmpty">isEmpty</a></b> () const</li>
 
51
<li><div class="fn"/>QVector&lt;QRect&gt; <b><a href="qregion.html#rects">rects</a></b> () const</li>
 
52
<li><div class="fn"/>QRegion <b><a href="qregion.html#subtract">subtract</a></b> ( const QRegion &amp; <i>r</i> ) const</li>
 
53
<li><div class="fn"/>void <b><a href="qregion.html#translate">translate</a></b> ( int <i>dx</i>, int <i>dy</i> )</li>
 
54
<li><div class="fn"/>void <b><a href="qregion.html#translate-2">translate</a></b> ( const QPoint &amp; <i>point</i> )</li>
 
55
<li><div class="fn"/>QRegion <b><a href="qregion.html#unite">unite</a></b> ( const QRegion &amp; <i>r</i> ) const</li>
 
56
<li><div class="fn"/><b><a href="qregion.html#operator-QVariant">operator QVariant</a></b> () const</li>
 
57
<li><div class="fn"/>bool <b><a href="qregion.html#operator-not-eq">operator!=</a></b> ( const QRegion &amp; <i>other</i> ) const</li>
 
58
<li><div class="fn"/>const QRegion <b><a href="qregion.html#operator-and">operator&amp;</a></b> ( const QRegion &amp; <i>r</i> ) const</li>
 
59
<li><div class="fn"/>QRegion &amp; <b><a href="qregion.html#operator-and-eq">operator&amp;=</a></b> ( const QRegion &amp; <i>r</i> )</li>
 
60
<li><div class="fn"/>const QRegion <b><a href="qregion.html#operator-2b">operator+</a></b> ( const QRegion &amp; <i>r</i> ) const</li>
 
61
<li><div class="fn"/>QRegion &amp; <b><a href="qregion.html#operator-2b-eq">operator+=</a></b> ( const QRegion &amp; <i>r</i> )</li>
 
62
<li><div class="fn"/>const QRegion <b><a href="qregion.html#operator-">operator-</a></b> ( const QRegion &amp; <i>r</i> ) const</li>
 
63
<li><div class="fn"/>QRegion &amp; <b><a href="qregion.html#operator--eq">operator-=</a></b> ( const QRegion &amp; <i>r</i> )</li>
 
64
<li><div class="fn"/>QRegion &amp; <b><a href="qregion.html#operator-eq">operator=</a></b> ( const QRegion &amp; <i>r</i> )</li>
 
65
<li><div class="fn"/>bool <b><a href="qregion.html#operator-eq-eq">operator==</a></b> ( const QRegion &amp; <i>r</i> ) const</li>
 
66
<li><div class="fn"/>const QRegion <b><a href="qregion.html#operator-5e">operator^</a></b> ( const QRegion &amp; <i>r</i> ) const</li>
 
67
<li><div class="fn"/>QRegion &amp; <b><a href="qregion.html#operator-5e-eq">operator^=</a></b> ( const QRegion &amp; <i>r</i> )</li>
 
68
<li><div class="fn"/>const QRegion <b><a href="qregion.html#operator-7c">operator|</a></b> ( const QRegion &amp; <i>r</i> ) const</li>
 
69
<li><div class="fn"/>QRegion &amp; <b><a href="qregion.html#operator-7c-eq">operator|=</a></b> ( const QRegion &amp; <i>r</i> )</li>
 
70
</ul>
 
71
<a name="related-non-members"></a>
 
72
<h3>Related Non-Members</h3>
 
73
<ul>
 
74
<li><div class="fn"/>QDataStream &amp; <b><a href="qregion.html#operator-lt-lt-76">operator&lt;&lt;</a></b> ( QDataStream &amp; <i>s</i>, const QRegion &amp; <i>r</i> )</li>
 
75
<li><div class="fn"/>QDataStream &amp; <b><a href="qregion.html#operator-gt-gt-52">operator&gt;&gt;</a></b> ( QDataStream &amp; <i>s</i>, QRegion &amp; <i>r</i> )</li>
 
76
</ul>
 
77
<a name="details"></a>
 
78
<hr />
 
79
<h2>Detailed Description</h2>
 
80
<p>The QRegion class specifies a clip region for a painter.</p>
 
81
<p>QRegion is used with <a href="qpainter.html#setClipRegion">QPainter::setClipRegion</a>() to limit the paint area to what needs to be painted. There is also a <a href="qwidget.html#repaint">QWidget::repaint</a>() function that takes a QRegion parameter. QRegion is the best tool for reducing flicker.</p>
 
82
<p>A region can be created from a rectangle, an ellipse, a polygon or a bitmap. Complex regions may be created by combining simple regions using <a href="qregion.html#unite">unite</a>(), <a href="qregion.html#intersect">intersect</a>(), <a href="qregion.html#subtract">subtract</a>(), or <a href="qregion.html#eor">eor</a>() (exclusive or). You can move a region using <a href="qregion.html#translate">translate</a>().</p>
 
83
<p>You can test whether a region <a href="qregion.html#isEmpty">isEmpty</a>() or if it <a href="qregion.html#contains">contains</a>() a <a href="qpoint.html">QPoint</a> or <a href="qrect.html">QRect</a>. The bounding rectangle can be found with <a href="qregion.html#boundingRect">boundingRect</a>().</p>
 
84
<p>The function <a href="qregion.html#rects">rects</a>() gives a decomposition of the region into rectangles.</p>
 
85
<p>Example of using complex regions:</p>
 
86
<pre>&nbsp;   void MyWidget::paintEvent(QPaintEvent *)
 
87
    {
 
88
        QPainter p;                       // our painter
 
89
        QRegion r1(QRect(100,100,200,80), // r1 = elliptic region
 
90
                   QRegion::Ellipse);
 
91
        QRegion r2(QRect(100,120,90,30)); // r2 = rectangular region
 
92
        QRegion r3 = r1.intersect(r2);    // r3 = intersection
 
93
        p.begin(this);                    // start painting widget
 
94
        p.setClipRegion(r3);              // set clip region
 
95
        ...                               // paint clipped graphics
 
96
        p.end();                          // painting done
 
97
    }</pre>
 
98
<p>QRegion is an <a href="shclass.html">implicitly shared</a> class.</p>
 
99
<p><b>Warning:</b> Due to window system limitations, the whole coordinate space for a region is limited to the points between -32767 and 32767 on Windows 95/98/ME. You can circumvent this limitation by using a <a href="qpainterpath.html">QPainterPath</a>.</p>
 
100
<p>See also <a href="qpainter.html#setClipRegion">QPainter::setClipRegion</a>(), <a href="qpainter.html#setClipRect">QPainter::setClipRect</a>(), and <a href="qpainterpath.html">QPainterPath</a>.</p>
 
101
<hr />
 
102
<h2>Member Type Documentation</h2>
 
103
<h3 class="fn"><a name="RegionType-enum"></a>enum QRegion::RegionType</h3>
 
104
<p>Specifies the shape of the region to be created.</p>
 
105
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
106
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
107
<tr><td valign="top"><tt>QRegion::Rectangle</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">the region covers the entire rectangle.</td></tr>
 
108
<tr><td valign="top"><tt>QRegion::Ellipse</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">the region is an ellipse inside the rectangle.</td></tr>
 
109
</table>
 
110
<hr />
 
111
<h2>Member Function Documentation</h2>
 
112
<h3 class="fn"><a name="QRegion"></a>QRegion::QRegion ()</h3>
 
113
<p>Constructs an empty region.</p>
 
114
<p>See also <a href="qregion.html#isEmpty">isEmpty</a>().</p>
 
115
<h3 class="fn"><a name="QRegion-2"></a>QRegion::QRegion ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i>, <a href="qregion.html#RegionType-enum">RegionType</a> <i>t</i> = Rectangle )</h3>
 
116
<p>Constructs a rectangular or elliptic region.</p>
 
117
<p>If <i>t</i> is <tt>Rectangle</tt>, the region is the filled rectangle (<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>). If <i>t</i> is <tt>Ellipse</tt>, the region is the filled ellipse with center at (<i>x</i> + <i>w</i> / 2, <i>y</i> + <i>h</i> / 2) and size (<i>w</i> ,<i>h</i>).</p>
 
118
<h3 class="fn"><a name="QRegion-3"></a>QRegion::QRegion ( const <a href="qpolygon.html">QPolygon</a> &amp; <i>a</i>, <a href="qt.html#FillRule-enum">Qt::FillRule</a> <i>fillRule</i> = Qt::OddEvenFill )</h3>
 
119
<p>Constructs a polygon region from the point array <i>a</i> with the fill rule specified by <i>fillRule</i>.</p>
 
120
<p>If <i>fillRule</i> is <a href="qt.html#FillRule-enum">Qt::WindingFill</a>, the polygon region is defined using the winding algorithm; if it is <a href="qt.html#FillRule-enum">Qt::OddEvenFill</a>, the odd-even fill algorithm is used.</p>
 
121
<p><b>Warning:</b> This constructor can be used to create complex regions that will slow down painting when used.</p>
 
122
<h3 class="fn"><a name="QRegion-5"></a>QRegion::QRegion ( const QRegion &amp; <i>r</i> )</h3>
 
123
<p>Constructs a new region which is equal to region <i>r</i>.</p>
 
124
<h3 class="fn"><a name="QRegion-6"></a>QRegion::QRegion ( const <a href="qbitmap.html">QBitmap</a> &amp; <i>bm</i> )</h3>
 
125
<p>Constructs a region from the bitmap <i>bm</i>.</p>
 
126
<p>The resulting region consists of the pixels in bitmap <i>bm</i> that are <tt>Qt::color1</tt>, as if each pixel was a 1 by 1 rectangle.</p>
 
127
<p>This constructor may create complex regions that will slow down painting when used. Note that drawing masked pixmaps can be done much faster using <a href="qpixmap.html#setMask">QPixmap::setMask</a>().</p>
 
128
<h3 class="fn"><a name="QRegion-7"></a>QRegion::QRegion ( const <a href="qrect.html">QRect</a> &amp; <i>r</i>, <a href="qregion.html#RegionType-enum">RegionType</a> <i>t</i> = Rectangle )</h3>
 
129
<p>Create a region based on the rectange <i>r</i> with region type <i>t</i>.</p>
 
130
<p>If the rectangle is invalid a null region will be created.</p>
 
131
<p>See also <a href="qregion.html#RegionType-enum">QRegion::RegionType</a>.</p>
 
132
<h3 class="fn"><a name="dtor.QRegion"></a>QRegion::~QRegion ()</h3>
 
133
<p>Destroys the region.</p>
 
134
<h3 class="fn"><a name="boundingRect"></a><a href="qrect.html">QRect</a> QRegion::boundingRect () const</h3>
 
135
<p>Returns the bounding rectangle of this region. An empty region gives a rectangle that is <a href="qrect.html#isNull">QRect::isNull</a>().</p>
 
136
<h3 class="fn"><a name="contains"></a>bool QRegion::contains ( const <a href="qpoint.html">QPoint</a> &amp; <i>p</i> ) const</h3>
 
137
<p>Returns true if the region contains the point <i>p</i>; otherwise returns false.</p>
 
138
<h3 class="fn"><a name="contains-2"></a>bool QRegion::contains ( const <a href="qrect.html">QRect</a> &amp; <i>r</i> ) const</h3>
 
139
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
140
<p>Returns true if the region overlaps the rectangle <i>r</i>; otherwise returns false.</p>
 
141
<h3 class="fn"><a name="eor"></a>QRegion QRegion::eor ( const QRegion &amp; <i>r</i> ) const</h3>
 
142
<p>Returns a region which is the exclusive or (XOR) of this region and <i>r</i>.</p>
 
143
<center><img src="images/rxor.png" alt="Region XORed" /></center><p>The figure shows the exclusive or of two elliptical regions.</p>
 
144
<h3 class="fn"><a name="handle"></a>Handle QRegion::handle () const</h3>
 
145
<p>Returns a platform-specific region handle. The <tt>Handle</tt> type is <tt>HRGN</tt> on Windows, <tt>Region</tt> on <a href="winsystem.html#x11">X11</a>, and <tt>RgnHandle</tt> on Mac OS X.</p>
 
146
<p><b>Warning:</b> This function is not portable.</p>
 
147
<h3 class="fn"><a name="handle-2"></a>Region QRegion::handle () const</h3>
 
148
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
149
<h3 class="fn"><a name="handle-3"></a>void * QRegion::handle () const</h3>
 
150
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
151
<h3 class="fn"><a name="intersect"></a>QRegion QRegion::intersect ( const QRegion &amp; <i>r</i> ) const</h3>
 
152
<p>Returns a region which is the intersection of this region and <i>r</i>.</p>
 
153
<center><img src="images/rintersect.png" alt="Region Intersection" /></center><p>The figure shows the intersection of two elliptical regions.</p>
 
154
<h3 class="fn"><a name="isEmpty"></a>bool QRegion::isEmpty () const</h3>
 
155
<p>Returns true if the region is empty; otherwise returns false. An empty region is a region that contains no points.</p>
 
156
<p>Example:</p>
 
157
<pre>&nbsp;   QRegion r1(10, 10, 20, 20);
 
158
    QRegion r2(40, 40, 20, 20);
 
159
    QRegion r3;
 
160
    r1.isNull();             // false
 
161
    r1.isEmpty();            // false
 
162
    r3.isNull();             // true
 
163
    r3.isEmpty();            // true
 
164
    r3 = r1.intersect(r2); // r3 = intersection of r1 and r2
 
165
    r3.isNull();             // false
 
166
    r3.isEmpty();            // true
 
167
    r3 = r1.unite(r2);     // r3 = union of r1 and r2
 
168
    r3.isNull();             // false
 
169
    r3.isEmpty();            // false</pre>
 
170
<h3 class="fn"><a name="rects"></a><a href="qvector.html">QVector</a>&lt;<a href="qrect.html">QRect</a>&gt; QRegion::rects () const</h3>
 
171
<p>Returns an array of non-overlapping rectangles that make up the region.</p>
 
172
<p>The union of all the rectangles is equal to the original region.</p>
 
173
<h3 class="fn"><a name="subtract"></a>QRegion QRegion::subtract ( const QRegion &amp; <i>r</i> ) const</h3>
 
174
<p>Returns a region which is <i>r</i> subtracted from this region.</p>
 
175
<center><img src="images/rsubtract.png" alt="Region Subtraction" /></center><p>The figure shows the result when the ellipse on the right is subtracted from the ellipse on the left. (<tt>left-right</tt>)</p>
 
176
<h3 class="fn"><a name="translate"></a>void QRegion::translate ( int <i>dx</i>, int <i>dy</i> )</h3>
 
177
<p>Translates (moves) the region <i>dx</i> along the X axis and <i>dy</i> along the Y axis.</p>
 
178
<h3 class="fn"><a name="translate-2"></a>void QRegion::translate ( const <a href="qpoint.html">QPoint</a> &amp; <i>point</i> )</h3>
 
179
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
180
<p>Translates to the given <i>point</i>.</p>
 
181
<h3 class="fn"><a name="unite"></a>QRegion QRegion::unite ( const QRegion &amp; <i>r</i> ) const</h3>
 
182
<p>Returns a region which is the union of this region and <i>r</i>.</p>
 
183
<center><img src="images/runion.png" alt="Region Union" /></center><p>The figure shows the union of two elliptical regions.</p>
 
184
<h3 class="fn"><a name="operator-QVariant"></a>QRegion::operator QVariant () const</h3>
 
185
<p>Returns the region as a <a href="qvariant.html">QVariant</a></p>
 
186
<h3 class="fn"><a name="operator-not-eq"></a>bool QRegion::operator!= ( const QRegion &amp; <i>other</i> ) const</h3>
 
187
<p>Returns true if this region is different from the <i>other</i> region; otherwise returns false.</p>
 
188
<h3 class="fn"><a name="operator-and"></a>const QRegion QRegion::operator&amp; ( const QRegion &amp; <i>r</i> ) const</h3>
 
189
<p>Applies the <a href="qregion.html#intersect">intersect</a>() function to this region and <i>r</i>. <tt>r1&amp;r2</tt> is equivalent to <tt>r1.intersect(r2)</tt></p>
 
190
<p>See also <a href="qregion.html#intersect">intersect</a>().</p>
 
191
<h3 class="fn"><a name="operator-and-eq"></a>QRegion &amp; QRegion::operator&amp;= ( const QRegion &amp; <i>r</i> )</h3>
 
192
<p>Applies the <a href="qregion.html#intersect">intersect</a>() function to this region and <i>r</i> and assigns the result to this region. <tt>r1&amp;=r2</tt> is equivalent to <tt>r1=r1.intersect(r2)</tt></p>
 
193
<p>See also <a href="qregion.html#intersect">intersect</a>().</p>
 
194
<h3 class="fn"><a name="operator-2b"></a>const QRegion QRegion::operator+ ( const QRegion &amp; <i>r</i> ) const</h3>
 
195
<p>Applies the <a href="qregion.html#unite">unite</a>() function to this region and <i>r</i>. <tt>r1+r2</tt> is equivalent to <tt>r1.unite(r2)</tt></p>
 
196
<p>See also <a href="qregion.html#unite">unite</a>() and <a href="qregion.html#operator-7c">operator|</a>().</p>
 
197
<h3 class="fn"><a name="operator-2b-eq"></a>QRegion &amp; QRegion::operator+= ( const QRegion &amp; <i>r</i> )</h3>
 
198
<p>Applies the <a href="qregion.html#unite">unite</a>() function to this region and <i>r</i> and assigns the result to this region. <tt>r1+=r2</tt> is equivalent to <tt>r1=r1.unite(r2)</tt></p>
 
199
<p>See also <a href="qregion.html#intersect">intersect</a>().</p>
 
200
<h3 class="fn"><a name="operator-"></a>const QRegion QRegion::operator- ( const QRegion &amp; <i>r</i> ) const</h3>
 
201
<p>Applies the <a href="qregion.html#subtract">subtract</a>() function to this region and <i>r</i>. <tt>r1-r2</tt> is equivalent to <tt>r1.subtract(r2)</tt></p>
 
202
<p>See also <a href="qregion.html#subtract">subtract</a>().</p>
 
203
<h3 class="fn"><a name="operator--eq"></a>QRegion &amp; QRegion::operator-= ( const QRegion &amp; <i>r</i> )</h3>
 
204
<p>Applies the <a href="qregion.html#subtract">subtract</a>() function to this region and <i>r</i> and assigns the result to this region. <tt>r1-=r2</tt> is equivalent to <tt>r1=r1.subtract(r2)</tt></p>
 
205
<p>See also <a href="qregion.html#subtract">subtract</a>().</p>
 
206
<h3 class="fn"><a name="operator-eq"></a>QRegion &amp; QRegion::operator= ( const QRegion &amp; <i>r</i> )</h3>
 
207
<p>Assigns <i>r</i> to this region and returns a reference to the region.</p>
 
208
<h3 class="fn"><a name="operator-eq-eq"></a>bool QRegion::operator== ( const QRegion &amp; <i>r</i> ) const</h3>
 
209
<p>Returns true if the region is equal to <i>r</i>; otherwise returns false.</p>
 
210
<h3 class="fn"><a name="operator-5e"></a>const QRegion QRegion::operator^ ( const QRegion &amp; <i>r</i> ) const</h3>
 
211
<p>Applies the <a href="qregion.html#eor">eor</a>() function to this region and <i>r</i>. <tt>r1^r2</tt> is equivalent to <tt>r1.eor(r2)</tt></p>
 
212
<p>See also <a href="qregion.html#eor">eor</a>().</p>
 
213
<h3 class="fn"><a name="operator-5e-eq"></a>QRegion &amp; QRegion::operator^= ( const QRegion &amp; <i>r</i> )</h3>
 
214
<p>Applies the <a href="qregion.html#eor">eor</a>() function to this region and <i>r</i> and assigns the result to this region. <tt>r1^=r2</tt> is equivalent to <tt>r1=r1.eor(r2)</tt></p>
 
215
<p>See also <a href="qregion.html#eor">eor</a>().</p>
 
216
<h3 class="fn"><a name="operator-7c"></a>const QRegion QRegion::operator| ( const QRegion &amp; <i>r</i> ) const</h3>
 
217
<p>Applies the <a href="qregion.html#unite">unite</a>() function to this region and <i>r</i>. <tt>r1|r2</tt> is equivalent to <tt>r1.unite(r2)</tt></p>
 
218
<p>See also <a href="qregion.html#unite">unite</a>() and <a href="qregion.html#operator-2b">operator+</a>().</p>
 
219
<h3 class="fn"><a name="operator-7c-eq"></a>QRegion &amp; QRegion::operator|= ( const QRegion &amp; <i>r</i> )</h3>
 
220
<p>Applies the <a href="qregion.html#unite">unite</a>() function to this region and <i>r</i> and assigns the result to this region. <tt>r1|=r2</tt> is equivalent to <tt>r1=r1.unite(r2)</tt></p>
 
221
<p>See also <a href="qregion.html#unite">unite</a>().</p>
 
222
<hr />
 
223
<h2>Related Non-Members</h2>
 
224
<h3 class="fn"><a name="operator-lt-lt-76"></a><a href="qdatastream.html">QDataStream</a> &amp; operator&lt;&lt; ( <a href="qdatastream.html">QDataStream</a> &amp; <i>s</i>, const QRegion &amp; <i>r</i> )</h3>
 
225
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
226
<p>Writes the region <i>r</i> to the stream <i>s</i> and returns a reference to the stream.</p>
 
227
<p>See also <a href="datastreamformat.html">Format of the QDataStream operators</a>.</p>
 
228
<h3 class="fn"><a name="operator-gt-gt-52"></a><a href="qdatastream.html">QDataStream</a> &amp; operator&gt;&gt; ( <a href="qdatastream.html">QDataStream</a> &amp; <i>s</i>, QRegion &amp; <i>r</i> )</h3>
 
229
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
230
<p>Reads a region from the stream <i>s</i> into <i>r</i> and returns a reference to the stream.</p>
 
231
<p>See also <a href="datastreamformat.html">Format of the QDataStream operators</a>.</p>
 
232
<p /><address><hr /><div align="center">
 
233
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
234
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
235
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
236
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
237
</tr></table></div></address></body>
 
238
</html>