source: trunk/doc/html/qregion.html@ 208

Last change on this file since 208 was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 21.0 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/kernel/qregion.cpp:44 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QRegion Class</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QRegion Class Reference</h1>
33
34<p>The QRegion class specifies a clip region for a painter.
35<a href="#details">More...</a>
36<p><tt>#include &lt;<a href="qregion-h.html">qregion.h</a>&gt;</tt>
37<p><a href="qregion-members.html">List of all member functions.</a>
38<h2>Public Members</h2>
39<ul>
40<li class=fn>enum <a href="#RegionType-enum"><b>RegionType</b></a> { Rectangle, Ellipse }</li>
41<li class=fn><a href="#QRegion"><b>QRegion</b></a> ()</li>
42<li class=fn><a href="#QRegion-2"><b>QRegion</b></a> ( int&nbsp;x, int&nbsp;y, int&nbsp;w, int&nbsp;h, RegionType&nbsp;t = Rectangle )</li>
43<li class=fn><a href="#QRegion-3"><b>QRegion</b></a> ( const&nbsp;QRect&nbsp;&amp;&nbsp;r, RegionType&nbsp;t = Rectangle )</li>
44<li class=fn><a href="#QRegion-4"><b>QRegion</b></a> ( const&nbsp;QPointArray&nbsp;&amp;&nbsp;a, bool&nbsp;winding = FALSE )</li>
45<li class=fn><a href="#QRegion-5"><b>QRegion</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;r )</li>
46<li class=fn><a href="#QRegion-6"><b>QRegion</b></a> ( const&nbsp;QBitmap&nbsp;&amp;&nbsp;bm )</li>
47<li class=fn><a href="#~QRegion"><b>~QRegion</b></a> ()</li>
48<li class=fn>QRegion &amp; <a href="#operator-eq"><b>operator=</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;r )</li>
49<li class=fn>bool <a href="#isNull"><b>isNull</b></a> () const</li>
50<li class=fn>bool <a href="#isEmpty"><b>isEmpty</b></a> () const</li>
51<li class=fn>bool <a href="#contains"><b>contains</b></a> ( const&nbsp;QPoint&nbsp;&amp;&nbsp;p ) const</li>
52<li class=fn>bool <a href="#contains-2"><b>contains</b></a> ( const&nbsp;QRect&nbsp;&amp;&nbsp;r ) const</li>
53<li class=fn>void <a href="#translate"><b>translate</b></a> ( int&nbsp;dx, int&nbsp;dy )</li>
54<li class=fn>QRegion <a href="#unite"><b>unite</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;r ) const</li>
55<li class=fn>QRegion <a href="#intersect"><b>intersect</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;r ) const</li>
56<li class=fn>QRegion <a href="#subtract"><b>subtract</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;r ) const</li>
57<li class=fn>QRegion <a href="#eor"><b>eor</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;r ) const</li>
58<li class=fn>QRect <a href="#boundingRect"><b>boundingRect</b></a> () const</li>
59<li class=fn>QMemArray&lt;QRect&gt; <a href="#rects"><b>rects</b></a> () const</li>
60<li class=fn>const QRegion <a href="#operator|"><b>operator|</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;r ) const</li>
61<li class=fn>const QRegion <a href="#operator+"><b>operator+</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;r ) const</li>
62<li class=fn>const QRegion <a href="#operator-and"><b>operator&amp;</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;r ) const</li>
63<li class=fn>const QRegion <a href="#operator-"><b>operator-</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;r ) const</li>
64<li class=fn>const QRegion <a href="#operator^"><b>operator^</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;r ) const</li>
65<li class=fn>QRegion &amp; <a href="#operator|-eq"><b>operator|=</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;r )</li>
66<li class=fn>QRegion &amp; <a href="#operator+-eq"><b>operator+=</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;r )</li>
67<li class=fn>QRegion &amp; <a href="#operator-and-eq"><b>operator&amp;=</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;r )</li>
68<li class=fn>QRegion &amp; <a href="#operator--eq"><b>operator-=</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;r )</li>
69<li class=fn>QRegion &amp; <a href="#operator^-eq"><b>operator^=</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;r )</li>
70<li class=fn>bool <a href="#operator-eq-eq"><b>operator==</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;r ) const</li>
71<li class=fn>bool <a href="#operator!-eq"><b>operator!=</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;r ) const</li>
72<li class=fn>HRGN <a href="#handle"><b>handle</b></a> () const</li>
73</ul>
74<h2>Related Functions</h2>
75<ul>
76<li class=fn>QDataStream &amp; <a href="#operator-lt-lt"><b>operator&lt;&lt;</b></a> ( QDataStream&nbsp;&amp;&nbsp;s, const&nbsp;QRegion&nbsp;&amp;&nbsp;r )</li>
77<li class=fn>QDataStream &amp; <a href="#operator-gt-gt"><b>operator&gt;&gt;</b></a> ( QDataStream&nbsp;&amp;&nbsp;s, QRegion&nbsp;&amp;&nbsp;r )</li>
78</ul>
79<hr><a name="details"></a><h2>Detailed Description</h2>
80
81
82The QRegion class specifies a clip region for a painter.
83<p>
84
85<p> QRegion is used with <a href="qpainter.html#setClipRegion">QPainter::setClipRegion</a>() to limit the paint
86area to what needs to be painted. There is also a
87<a href="qwidget.html#repaint">QWidget::repaint</a>() that takes a QRegion parameter. QRegion is the
88best tool for reducing flicker.
89<p> A region can be created from a rectangle, an ellipse, a polygon or
90a bitmap. Complex regions may be created by combining simple
91regions using <a href="#unite">unite</a>(), <a href="#intersect">intersect</a>(), <a href="#subtract">subtract</a>() or <a href="#eor">eor</a>() (exclusive
92or). You can move a region using <a href="#translate">translate</a>().
93<p> You can test whether a region <a href="#isNull">isNull</a>(), <a href="#isEmpty">isEmpty</a>() or if it
94<a href="#contains">contains</a>() a <a href="qpoint.html">QPoint</a> or <a href="qrect.html">QRect</a>. The bounding rectangle is given by
95<a href="#boundingRect">boundingRect</a>().
96<p> The function <a href="#rects">rects</a>() gives a decomposition of the region into
97rectangles.
98<p> Example of using complex regions:
99<pre>
100 void MyWidget::paintEvent( <a href="qpaintevent.html">QPaintEvent</a> * )
101 {
102 <a href="qpainter.html">QPainter</a> p; // our painter
103 QRegion r1( QRect(100,100,200,80), // r1 = elliptic region
104 QRegion::<a href="#RegionType-enum">Ellipse</a> );
105 QRegion r2( QRect(100,120,90,30) ); // r2 = rectangular region
106 QRegion r3 = r1.<a href="#intersect">intersect</a>( r2 ); // r3 = intersection
107 p.<a href="qpainter.html#begin">begin</a>( this ); // start painting widget
108 p.<a href="qpainter.html#setClipRegion">setClipRegion</a>( r3 ); // set clip region
109 ... // paint clipped graphics
110 p.<a href="qpainter.html#end">end</a>(); // painting done
111 }
112 </pre>
113
114<p> QRegion is an <a href="shclass.html">implicitly shared</a> class.
115<p> <b>Warning:</b> Due to window system limitations, the whole coordinate
116space for a region is limited to the points between -32767 and
11732767 on Mac OS X and Windows 95/98/ME.
118<p> <p>See also <a href="qpainter.html#setClipRegion">QPainter::setClipRegion</a>(), <a href="qpainter.html#setClipRect">QPainter::setClipRect</a>(), <a href="graphics.html">Graphics Classes</a>, and <a href="images.html">Image Processing Classes</a>.
119
120<hr><h2>Member Type Documentation</h2>
121<h3 class=fn><a name="RegionType-enum"></a>QRegion::RegionType</h3>
122
123<p> Specifies the shape of the region to be created.
124<ul>
125<li><tt>QRegion::Rectangle</tt> - the region covers the entire rectangle.
126<li><tt>QRegion::Ellipse</tt> - the region is an ellipse inside the rectangle.
127</ul>
128<hr><h2>Member Function Documentation</h2>
129<h3 class=fn><a name="QRegion"></a>QRegion::QRegion ()
130</h3>
131Constructs a null region.
132<p> <p>See also <a href="#isNull">isNull</a>().
133
134<h3 class=fn><a name="QRegion-2"></a>QRegion::QRegion ( int&nbsp;x, int&nbsp;y, int&nbsp;w, int&nbsp;h, <a href="qregion.html#RegionType-enum">RegionType</a>&nbsp;t = Rectangle )
135</h3>
136Constructs a rectangular or elliptic region.
137<p> If <em>t</em> is <a href="#RegionType-enum">Rectangle</a>, the region is the filled rectangle (<em>x</em>,
138<em>y</em>, <em>w</em>, <em>h</em>). If <em>t</em> is <a href="#RegionType-enum">Ellipse</a>, the region is the filled
139ellipse with center at (<em>x</em> + <em>w</em> / 2, <em>y</em> + <em>h</em> / 2) and size
140(<em>w</em> ,<em>h</em> ).
141
142<h3 class=fn><a name="QRegion-3"></a>QRegion::QRegion ( const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;r, <a href="qregion.html#RegionType-enum">RegionType</a>&nbsp;t = Rectangle )
143</h3>
144This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
145<p> Create a region based on the rectange <em>r</em> with region type <em>t</em>.
146<p> If the rectangle is invalid a null region will be created.
147<p> <p>See also <a href="#RegionType-enum">QRegion::RegionType</a>.
148
149<h3 class=fn><a name="QRegion-4"></a>QRegion::QRegion ( const&nbsp;<a href="qpointarray.html">QPointArray</a>&nbsp;&amp;&nbsp;a, bool&nbsp;winding = FALSE )
150</h3>
151Constructs a polygon region from the point array <em>a</em>.
152<p> If <em>winding</em> is TRUE, the polygon region is filled using the
153winding algorithm, otherwise the default even-odd fill algorithm
154is used.
155<p> This constructor may create complex regions that will slow down
156painting when used.
157
158<h3 class=fn><a name="QRegion-5"></a>QRegion::QRegion ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r )
159</h3>
160Constructs a new region which is equal to region <em>r</em>.
161
162<h3 class=fn><a name="QRegion-6"></a>QRegion::QRegion ( const&nbsp;<a href="qbitmap.html">QBitmap</a>&nbsp;&amp;&nbsp;bm )
163</h3>
164Constructs a region from the bitmap <em>bm</em>.
165<p> The resulting region consists of the pixels in bitmap <em>bm</em> that
166are <tt>color1</tt>, as if each pixel was a 1 by 1 rectangle.
167<p> This constructor may create complex regions that will slow down
168painting when used. Note that drawing masked pixmaps can be done
169much faster using <a href="qpixmap.html#setMask">QPixmap::setMask</a>().
170
171<h3 class=fn><a name="~QRegion"></a>QRegion::~QRegion ()
172</h3>
173Destroys the region.
174
175<h3 class=fn><a href="qrect.html">QRect</a> <a name="boundingRect"></a>QRegion::boundingRect () const
176</h3>
177Returns the bounding rectangle of this region. An empty region
178gives a rectangle that is <a href="qrect.html#isNull">QRect::isNull</a>().
179
180<h3 class=fn>bool <a name="contains"></a>QRegion::contains ( const&nbsp;<a href="qpoint.html">QPoint</a>&nbsp;&amp;&nbsp;p ) const
181</h3>
182Returns TRUE if the region contains the point <em>p</em>; otherwise
183returns FALSE.
184
185<h3 class=fn>bool <a name="contains-2"></a>QRegion::contains ( const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;r ) const
186</h3>
187This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
188<p> Returns TRUE if the region overlaps the rectangle <em>r</em>; otherwise
189returns FALSE.
190
191<h3 class=fn><a href="qregion.html">QRegion</a> <a name="eor"></a>QRegion::eor ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r ) const
192</h3>
193Returns a region which is the exclusive or (XOR) of this region
194and <em>r</em>.
195<p> <center><img src="rxor.png" alt="Region XORed"></center>
196<p> The figure shows the exclusive or of two elliptical regions.
197
198<h3 class=fn>HRGN <a name="handle"></a>QRegion::handle () const
199</h3>
200
201<p> Returns the region's handle.
202
203<h3 class=fn><a href="qregion.html">QRegion</a> <a name="intersect"></a>QRegion::intersect ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r ) const
204</h3>
205Returns a region which is the intersection of this region and <em>r</em>.
206<p> <center><img src="rintersect.png" alt="Region Intersection"></center>
207<p> The figure shows the intersection of two elliptical regions.
208
209<h3 class=fn>bool <a name="isEmpty"></a>QRegion::isEmpty () const
210</h3>
211Returns TRUE if the region is empty; otherwise returns FALSE. An
212empty region is a region that contains no points.
213<p> Example:
214<pre>
215 QRegion r1( 10, 10, 20, 20 );
216 QRegion r2( 40, 40, 20, 20 );
217 QRegion r3;
218 r1.<a href="#isNull">isNull</a>(); // FALSE
219 r1.<a href="#isEmpty">isEmpty</a>(); // FALSE
220 r3.<a href="#isNull">isNull</a>(); // TRUE
221 r3.<a href="#isEmpty">isEmpty</a>(); // TRUE
222 r3 = r1.<a href="#intersect">intersect</a>( r2 ); // r3 = intersection of r1 and r2
223 r3.<a href="#isNull">isNull</a>(); // FALSE
224 r3.<a href="#isEmpty">isEmpty</a>(); // TRUE
225 r3 = r1.<a href="#unite">unite</a>( r2 ); // r3 = union of r1 and r2
226 r3.<a href="#isNull">isNull</a>(); // FALSE
227 r3.<a href="#isEmpty">isEmpty</a>(); // FALSE
228 </pre>
229
230<p> <p>See also <a href="#isNull">isNull</a>().
231
232<h3 class=fn>bool <a name="isNull"></a>QRegion::isNull () const
233</h3>
234Returns TRUE if the region is a null region; otherwise returns
235FALSE.
236<p> A null region is a region that has not been initialized. A null
237region is always empty.
238<p> <p>See also <a href="#isEmpty">isEmpty</a>().
239
240<h3 class=fn>bool <a name="operator!-eq"></a>QRegion::operator!= ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r ) const
241</h3>
242
243<p> Returns TRUE if the region is different from <em>r</em>; otherwise
244returns FALSE.
245
246<h3 class=fn>const&nbsp;<a href="qregion.html">QRegion</a> <a name="operator-and"></a>QRegion::operator&amp; ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r ) const
247</h3>
248Applies the <a href="#intersect">intersect</a>() function to this region and <em>r</em>. <tt>r1&amp;r2</tt>
249is equivalent to <tt>r1.intersect(r2)</tt>
250<p> <p>See also <a href="#intersect">intersect</a>().
251
252<h3 class=fn><a href="qregion.html">QRegion</a>&nbsp;&amp; <a name="operator-and-eq"></a>QRegion::operator&amp;= ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r )
253</h3>
254Applies the <a href="#intersect">intersect</a>() function to this region and <em>r</em> and
255assigns the result to this region. <tt>r1&amp;=r2</tt> is equivalent to <tt>r1=r1.intersect(r2)</tt>
256<p> <p>See also <a href="#intersect">intersect</a>().
257
258<h3 class=fn>const&nbsp;<a href="qregion.html">QRegion</a> <a name="operator+"></a>QRegion::operator+ ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r ) const
259</h3>
260Applies the <a href="#unite">unite</a>() function to this region and <em>r</em>. <tt>r1+r2</tt> is
261equivalent to <tt>r1.unite(r2)</tt>
262<p> <p>See also <a href="#unite">unite</a>() and <a href="#operator|">operator|</a>().
263
264<h3 class=fn><a href="qregion.html">QRegion</a>&nbsp;&amp; <a name="operator+-eq"></a>QRegion::operator+= ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r )
265</h3>
266Applies the <a href="#unite">unite</a>() function to this region and <em>r</em> and assigns
267the result to this region. <tt>r1+=r2</tt> is equivalent to <tt>r1=r1.unite(r2)</tt>
268<p> <p>See also <a href="#intersect">intersect</a>().
269
270<h3 class=fn>const&nbsp;<a href="qregion.html">QRegion</a> <a name="operator-"></a>QRegion::operator- ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r ) const
271</h3>
272Applies the <a href="#subtract">subtract</a>() function to this region and <em>r</em>. <tt>r1-r2</tt>
273is equivalent to <tt>r1.subtract(r2)</tt>
274<p> <p>See also <a href="#subtract">subtract</a>().
275
276<h3 class=fn><a href="qregion.html">QRegion</a>&nbsp;&amp; <a name="operator--eq"></a>QRegion::operator-= ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r )
277</h3>
278Applies the <a href="#subtract">subtract</a>() function to this region and <em>r</em> and
279assigns the result to this region. <tt>r1-=r2</tt> is equivalent to <tt>r1=r1.subtract(r2)</tt>
280<p> <p>See also <a href="#subtract">subtract</a>().
281
282<h3 class=fn><a href="qregion.html">QRegion</a>&nbsp;&amp; <a name="operator-eq"></a>QRegion::operator= ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r )
283</h3>
284Assigns <em>r</em> to this region and returns a reference to the region.
285
286<h3 class=fn>bool <a name="operator-eq-eq"></a>QRegion::operator== ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r ) const
287</h3>
288Returns TRUE if the region is equal to <em>r</em>; otherwise returns
289FALSE.
290
291<h3 class=fn>const&nbsp;<a href="qregion.html">QRegion</a> <a name="operator^"></a>QRegion::operator^ ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r ) const
292</h3>
293Applies the <a href="#eor">eor</a>() function to this region and <em>r</em>. <tt>r1^r2</tt> is
294equivalent to <tt>r1.eor(r2)</tt>
295<p> <p>See also <a href="#eor">eor</a>().
296
297<h3 class=fn><a href="qregion.html">QRegion</a>&nbsp;&amp; <a name="operator^-eq"></a>QRegion::operator^= ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r )
298</h3>
299Applies the <a href="#eor">eor</a>() function to this region and <em>r</em> and
300assigns the result to this region. <tt>r1^=r2</tt> is equivalent to <tt>r1=r1.eor(r2)</tt>
301<p> <p>See also <a href="#eor">eor</a>().
302
303<h3 class=fn>const&nbsp;<a href="qregion.html">QRegion</a> <a name="operator|"></a>QRegion::operator| ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r ) const
304</h3>
305Applies the <a href="#unite">unite</a>() function to this region and <em>r</em>. <tt>r1|r2</tt> is
306equivalent to <tt>r1.unite(r2)</tt>
307<p> <p>See also <a href="#unite">unite</a>() and <a href="#operator+">operator+</a>().
308
309<h3 class=fn><a href="qregion.html">QRegion</a>&nbsp;&amp; <a name="operator|-eq"></a>QRegion::operator|= ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r )
310</h3>
311Applies the <a href="#unite">unite</a>() function to this region and <em>r</em> and assigns
312the result to this region. <tt>r1|=r2</tt> is equivalent to <tt>r1=r1.unite(r2)</tt>
313<p> <p>See also <a href="#unite">unite</a>().
314
315<h3 class=fn><a href="qmemarray.html">QMemArray</a>&lt;QRect&gt; <a name="rects"></a>QRegion::rects () const
316</h3>
317Returns an array of non-overlapping rectangles that make up the
318region.
319<p> The union of all the rectangles is equal to the original region.
320
321<h3 class=fn><a href="qregion.html">QRegion</a> <a name="subtract"></a>QRegion::subtract ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r ) const
322</h3>
323Returns a region which is <em>r</em> subtracted from this region.
324<p> <center><img src="rsubtract.png" alt="Region Subtraction"></center>
325<p> The figure shows the result when the ellipse on the right is
326subtracted from the ellipse on the left. (<tt>left-right</tt> )
327
328<h3 class=fn>void <a name="translate"></a>QRegion::translate ( int&nbsp;dx, int&nbsp;dy )
329</h3>
330Translates (moves) the region <em>dx</em> along the X axis and <em>dy</em>
331along the Y axis.
332
333<h3 class=fn><a href="qregion.html">QRegion</a> <a name="unite"></a>QRegion::unite ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r ) const
334</h3>
335Returns a region which is the union of this region and <em>r</em>.
336<p> <center><img src="runion.png" alt="Region Union"></center>
337<p> The figure shows the union of two elliptical regions.
338
339<hr><h2>Related Functions</h2>
340<h3 class=fn><a href="qdatastream.html">QDataStream</a>&nbsp;&amp; <a name="operator-lt-lt"></a>operator&lt;&lt; ( <a href="qdatastream.html">QDataStream</a>&nbsp;&amp;&nbsp;s, const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r )
341</h3>
342
343<p> Writes the region <em>r</em> to the stream <em>s</em> and returns a reference
344to the stream.
345<p> <p>See also <a href="datastreamformat.html">Format of the QDataStream operators</a>.
346
347<h3 class=fn><a href="qdatastream.html">QDataStream</a>&nbsp;&amp; <a name="operator-gt-gt"></a>operator&gt;&gt; ( <a href="qdatastream.html">QDataStream</a>&nbsp;&amp;&nbsp;s, <a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;r )
348</h3>
349
350<p> Reads a region from the stream <em>s</em> into <em>r</em> and returns a
351reference to the stream.
352<p> <p>See also <a href="datastreamformat.html">Format of the QDataStream operators</a>.
353
354<!-- eof -->
355<hr><p>
356This file is part of the <a href="index.html">Qt toolkit</a>.
357Copyright &copy; 1995-2007
358<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
359<table width=100% cellspacing=0 border=0><tr>
360<td>Copyright &copy; 2007
361<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
362<td align=right><div align=right>Qt 3.3.8</div>
363</table></div></address></body>
364</html>
Note: See TracBrowser for help on using the repository browser.