Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 6245

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qregion.cpp -->
  <title>Qt 4.8: QRegion Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QRegion</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#creating-and-using-regions">Creating and Using Regions</a></li>
<li class="level2"><a href="#additional-license-information">Additional License Information</a></li>
</ul>
</div>
<h1 class="title">QRegion Class Reference</h1>
<!-- $$$QRegion-brief -->
<p>The QRegion class specifies a clip region for a painter. <a href="#details">More...</a></p>
<!-- @@@QRegion -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QRegion&gt;</span></pre><ul>
<li><a href="qregion-members.html">List of all members, including inherited members</a></li>
<li><a href="qregion-obsolete.html">Obsolete members</a></li>
<li><a href="qregion-qt3.html">Qt 3 support members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#RegionType-enum">RegionType</a></b> { Rectangle, Ellipse }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#QRegion">QRegion</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><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 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#QRegion-3">QRegion</a></b> ( const QPolygon &amp; <i>a</i>, Qt::FillRule <i>fillRule</i> = Qt::OddEvenFill )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#QRegion-5">QRegion</a></b> ( const QRegion &amp; <i>r</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#QRegion-6">QRegion</a></b> ( const QBitmap &amp; <i>bm</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#QRegion-7">QRegion</a></b> ( const QRect &amp; <i>r</i>, RegionType <i>t</i> = Rectangle )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#boundingRect">boundingRect</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#contains">contains</a></b> ( const QPoint &amp; <i>p</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#contains-2">contains</a></b> ( const QRect &amp; <i>r</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Handle </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#handle">handle</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRegion </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#intersected">intersected</a></b> ( const QRegion &amp; <i>r</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRegion </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#intersected-2">intersected</a></b> ( const QRect &amp; <i>rect</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#intersects">intersects</a></b> ( const QRegion &amp; <i>region</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#intersects-2">intersects</a></b> ( const QRect &amp; <i>rect</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#isEmpty">isEmpty</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#rectCount">rectCount</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVector&lt;QRect&gt; </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#rects">rects</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#setRects">setRects</a></b> ( const QRect * <i>rects</i>, int <i>number</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRegion </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#subtracted">subtracted</a></b> ( const QRegion &amp; <i>r</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#swap">swap</a></b> ( QRegion &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#translate">translate</a></b> ( int <i>dx</i>, int <i>dy</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#translate-2">translate</a></b> ( const QPoint &amp; <i>point</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRegion </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#translated">translated</a></b> ( int <i>dx</i>, int <i>dy</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRegion </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#translated-2">translated</a></b> ( const QPoint &amp; <i>p</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRegion </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#united">united</a></b> ( const QRegion &amp; <i>r</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRegion </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#united-2">united</a></b> ( const QRect &amp; <i>rect</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRegion </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#xored">xored</a></b> ( const QRegion &amp; <i>r</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator-QVariant">operator QVariant</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator-not-eq">operator!=</a></b> ( const QRegion &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QRegion </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator-and">operator&amp;</a></b> ( const QRegion &amp; <i>r</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QRegion </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator-and-2">operator&amp;</a></b> ( const QRect &amp; <i>r</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRegion &amp; </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator-and-eq">operator&amp;=</a></b> ( const QRegion &amp; <i>r</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRegion &amp; </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator-and-eq-2">operator&amp;=</a></b> ( const QRect &amp; <i>r</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QRegion </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator-2b">operator+</a></b> ( const QRegion &amp; <i>r</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QRegion </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator-2b-2">operator+</a></b> ( const QRect &amp; <i>r</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRegion &amp; </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator-2b-eq">operator+=</a></b> ( const QRegion &amp; <i>r</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRegion &amp; </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator-2b-eq-2">operator+=</a></b> ( const QRect &amp; <i>rect</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QRegion </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator-">operator-</a></b> ( const QRegion &amp; <i>r</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRegion &amp; </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator--eq">operator-=</a></b> ( const QRegion &amp; <i>r</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRegion &amp; </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator-eq">operator=</a></b> ( const QRegion &amp; <i>r</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator-eq-eq">operator==</a></b> ( const QRegion &amp; <i>r</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QRegion </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator-5e">operator^</a></b> ( const QRegion &amp; <i>r</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRegion &amp; </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator-5e-eq">operator^=</a></b> ( const QRegion &amp; <i>r</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QRegion </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator-7c">operator|</a></b> ( const QRegion &amp; <i>r</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRegion &amp; </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator-7c-eq">operator|=</a></b> ( const QRegion &amp; <i>r</i> )</td></tr>
</table>
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp; </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator-lt-lt-45">operator&lt;&lt;</a></b> ( QDataStream &amp; <i>s</i>, const QRegion &amp; <i>r</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp; </td><td class="memItemRight bottomAlign"><b><a href="qregion.html#operator-gt-gt-27">operator&gt;&gt;</a></b> ( QDataStream &amp; <i>s</i>, QRegion &amp; <i>r</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$QRegion-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QRegion class specifies a clip region for a painter.</p>
<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 minimizing the amount of screen area to be updated by a repaint.</p>
<p>This class is not suitable for constructing shapes for rendering, especially as outlines. Use <a href="qpainterpath.html">QPainterPath</a> to create paths and shapes for use with <a href="qpainter.html">QPainter</a>.</p>
<p>QRegion is an <a href="implicit-sharing.html#implicitly-shared">implicitly shared</a> class.</p>
<a name="creating-and-using-regions"></a>
<h3>Creating and Using Regions</h3>
<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#united">united</a>(), <a href="qregion.html#intersected">intersected</a>(), <a href="qregion.html#subtracted">subtracted</a>(), or <a href="qregion.html#xored">xored</a>() (exclusive or). You can move a region using <a href="qregion.html#translate">translate</a>().</p>
<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>
<p>The function <a href="qregion.html#rects">rects</a>() gives a decomposition of the region into rectangles.</p>
<p>Example of using complex regions:</p>
<pre class="cpp"> <span class="type">void</span> MyWidget<span class="operator">::</span>paintEvent(<span class="type"><a href="qpaintevent.html">QPaintEvent</a></span> <span class="operator">*</span>)
 {
     <span class="type">QRegion</span> r1(<span class="type"><a href="qrect.html">QRect</a></span>(<span class="number">100</span><span class="operator">,</span> <span class="number">100</span><span class="operator">,</span> <span class="number">200</span><span class="operator">,</span> <span class="number">80</span>)<span class="operator">,</span>    <span class="comment">// r1: elliptic region</span>
                <span class="type">QRegion</span><span class="operator">::</span>Ellipse);
     <span class="type">QRegion</span> r2(<span class="type"><a href="qrect.html">QRect</a></span>(<span class="number">100</span><span class="operator">,</span> <span class="number">120</span><span class="operator">,</span> <span class="number">90</span><span class="operator">,</span> <span class="number">30</span>));    <span class="comment">// r2: rectangular region</span>
     <span class="type">QRegion</span> r3 <span class="operator">=</span> r1<span class="operator">.</span>intersected(r2);        <span class="comment">// r3: intersection</span>

     <span class="type"><a href="qpainter.html">QPainter</a></span> painter(<span class="keyword">this</span>);
     painter<span class="operator">.</span>setClipRegion(r3);
     <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>                                     <span class="comment">// paint clipped graphics</span>
 }</pre>
<a name="additional-license-information"></a>
<h3>Additional License Information</h3>
<p>On Embedded Linux, Windows CE and X11 platforms, parts of this class rely on code obtained under the following licenses:</p>
<div class="LegaleseLeft"><p>Copyright (c) 1987 X Consortium</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &quot;Software&quot;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
<p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
<p>Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium.</p>
</div><br /><div class="LegaleseLeft"><p>Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.</p>
<p>All Rights Reserved</p>
<p>Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.</p>
<p>DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</p>
</div></div>
<p><b>See also </b><a href="qpainter.html#setClipRegion">QPainter::setClipRegion</a>(), <a href="qpainter.html#setClipRect">QPainter::setClipRect</a>(), and <a href="qpainterpath.html">QPainterPath</a>.</p>
<!-- @@@QRegion -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$RegionType$$$Rectangle$$$Ellipse -->
<h3 class="fn"><a name="RegionType-enum"></a>enum QRegion::<span class="name">RegionType</span></h3>
<p>Specifies the shape of the region to be created.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QRegion::Rectangle</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">the region covers the entire rectangle.</td></tr>
<tr><td class="topAlign"><tt>QRegion::Ellipse</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">the region is an ellipse inside the rectangle.</td></tr>
</table>
<!-- @@@RegionType -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QRegion[overload1]$$$QRegion -->
<h3 class="fn"><a name="QRegion"></a>QRegion::<span class="name">QRegion</span> ()</h3>
<p>Constructs an empty region.</p>
<p><b>See also </b><a href="qregion.html#isEmpty">isEmpty</a>().</p>
<!-- @@@QRegion -->
<!-- $$$QRegion$$$QRegionintintintintRegionType -->
<h3 class="fn"><a name="QRegion-2"></a>QRegion::<span class="name">QRegion</span> ( <span class="type">int</span> <i>x</i>, <span class="type">int</span> <i>y</i>, <span class="type">int</span> <i>w</i>, <span class="type">int</span> <i>h</i>, <span class="type"><a href="qregion.html#RegionType-enum">RegionType</a></span> <i>t</i> = Rectangle )</h3>
<p>Constructs a rectangular or elliptic region.</p>
<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>
<!-- @@@QRegion -->
<!-- $$$QRegion$$$QRegionconstQPolygon&Qt::FillRule -->
<h3 class="fn"><a name="QRegion-3"></a>QRegion::<span class="name">QRegion</span> ( const <span class="type"><a href="qpolygon.html">QPolygon</a></span> &amp; <i>a</i>, <span class="type"><a href="qt.html#FillRule-enum">Qt::FillRule</a></span> <i>fillRule</i> = Qt::OddEvenFill )</h3>
<p>Constructs a polygon region from the point array <i>a</i> with the fill rule specified by <i>fillRule</i>.</p>
<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>
<p><b>Warning:</b> This constructor can be used to create complex regions that will slow down painting when used.</p>
<!-- @@@QRegion -->
<!-- $$$QRegion$$$QRegionconstQRegion& -->
<h3 class="fn"><a name="QRegion-5"></a>QRegion::<span class="name">QRegion</span> ( const <span class="type">QRegion</span> &amp; <i>r</i> )</h3>
<p>Constructs a new region which is equal to region <i>r</i>.</p>
<!-- @@@QRegion -->
<!-- $$$QRegion$$$QRegionconstQBitmap& -->
<h3 class="fn"><a name="QRegion-6"></a>QRegion::<span class="name">QRegion</span> ( const <span class="type"><a href="qbitmap.html">QBitmap</a></span> &amp; <i>bm</i> )</h3>
<p>Constructs a region from the bitmap <i>bm</i>.</p>
<p>The resulting region consists of the pixels in bitmap <i>bm</i> that are <a href="qt.html#GlobalColor-enum">Qt::color1</a>, as if each pixel was a 1 by 1 rectangle.</p>
<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>
<!-- @@@QRegion -->
<!-- $$$QRegion$$$QRegionconstQRect&RegionType -->
<h3 class="fn"><a name="QRegion-7"></a>QRegion::<span class="name">QRegion</span> ( const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>r</i>, <span class="type"><a href="qregion.html#RegionType-enum">RegionType</a></span> <i>t</i> = Rectangle )</h3>
<p>This is an overloaded function.</p>
<p>Create a region based on the rectange <i>r</i> with region type <i>t</i>.</p>
<p>If the rectangle is invalid a null region will be created.</p>
<p><b>See also </b><a href="qregion.html#RegionType-enum">QRegion::RegionType</a>.</p>
<!-- @@@QRegion -->
<!-- $$$boundingRect[overload1]$$$boundingRect -->
<h3 class="fn"><a name="boundingRect"></a><span class="type"><a href="qrect.html">QRect</a></span> QRegion::<span class="name">boundingRect</span> () const</h3>
<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>
<!-- @@@boundingRect -->
<!-- $$$contains[overload1]$$$containsconstQPoint& -->
<h3 class="fn"><a name="contains"></a><span class="type">bool</span> QRegion::<span class="name">contains</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>p</i> ) const</h3>
<p>Returns true if the region contains the point <i>p</i>; otherwise returns false.</p>
<!-- @@@contains -->
<!-- $$$contains$$$containsconstQRect& -->
<h3 class="fn"><a name="contains-2"></a><span class="type">bool</span> QRegion::<span class="name">contains</span> ( const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>r</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns true if the region overlaps the rectangle <i>r</i>; otherwise returns false.</p>
<!-- @@@contains -->
<!-- $$$handle[overload1]$$$handle -->
<h3 class="fn"><a name="handle"></a><span class="type">Handle</span> QRegion::<span class="name">handle</span> () const</h3>
<p>Returns a platform-specific region handle. The <tt>Handle</tt> type is <tt>HRGN</tt> on Windows, <tt>Region</tt> on X11, and <tt>RgnHandle</tt> on Mac OS X. On <a href="qt-embedded-linux.html">Qt for Embedded Linux</a> it is <tt>void *</tt>.</p>
<p><b>Warning:</b> This function is not portable.</p>
<!-- @@@handle -->
<!-- $$$intersected[overload1]$$$intersectedconstQRegion& -->
<h3 class="fn"><a name="intersected"></a><span class="type">QRegion</span> QRegion::<span class="name">intersected</span> ( const <span class="type">QRegion</span> &amp; <i>r</i> ) const</h3>
<p>Returns a region which is the intersection of this region and <i>r</i>.</p>
<p class="centerAlign"><img src="images/rintersect.png" alt="Region Intersection" /></p><p>The figure shows the intersection of two elliptical regions.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qregion.html#subtracted">subtracted</a>(), <a href="qregion.html#united">united</a>(), and <a href="qregion.html#xored">xored</a>().</p>
<!-- @@@intersected -->
<!-- $$$intersected$$$intersectedconstQRect& -->
<h3 class="fn"><a name="intersected-2"></a><span class="type">QRegion</span> QRegion::<span class="name">intersected</span> ( const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>rect</i> ) const</h3>
<p>Returns a region which is the intersection of this region and the given <i>rect</i>.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qregion.html#subtracted">subtracted</a>(), <a href="qregion.html#united">united</a>(), and <a href="qregion.html#xored">xored</a>().</p>
<!-- @@@intersected -->
<!-- $$$intersects[overload1]$$$intersectsconstQRegion& -->
<h3 class="fn"><a name="intersects"></a><span class="type">bool</span> QRegion::<span class="name">intersects</span> ( const <span class="type">QRegion</span> &amp; <i>region</i> ) const</h3>
<p>Returns true if this region intersects with <i>region</i>, otherwise returns false.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@intersects -->
<!-- $$$intersects$$$intersectsconstQRect& -->
<h3 class="fn"><a name="intersects-2"></a><span class="type">bool</span> QRegion::<span class="name">intersects</span> ( const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>rect</i> ) const</h3>
<p>Returns true if this region intersects with <i>rect</i>, otherwise returns false.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@intersects -->
<!-- $$$isEmpty[overload1]$$$isEmpty -->
<h3 class="fn"><a name="isEmpty"></a><span class="type">bool</span> QRegion::<span class="name">isEmpty</span> () const</h3>
<p>Returns true if the region is empty; otherwise returns false. An empty region is a region that contains no points.</p>
<p>Example:</p>
<pre class="cpp"> <span class="type"><a href="qregion.html">QRegion</a></span> r1(<span class="number">10</span><span class="operator">,</span> <span class="number">10</span><span class="operator">,</span> <span class="number">20</span><span class="operator">,</span> <span class="number">20</span>);
 r1<span class="operator">.</span>isEmpty();               <span class="comment">// false</span>

 <span class="type"><a href="qregion.html">QRegion</a></span> r3;
 r3<span class="operator">.</span>isEmpty();               <span class="comment">// true</span>

 <span class="type"><a href="qregion.html">QRegion</a></span> r2(<span class="number">40</span><span class="operator">,</span> <span class="number">40</span><span class="operator">,</span> <span class="number">20</span><span class="operator">,</span> <span class="number">20</span>);
 r3 <span class="operator">=</span> r1<span class="operator">.</span><a href="qregion.html#intersected">intersected</a>(r2);    <span class="comment">// r3: intersection of r1 and r2</span>
 r3<span class="operator">.</span>isEmpty();               <span class="comment">// true</span>

 r3 <span class="operator">=</span> r1<span class="operator">.</span><a href="qregion.html#united">united</a>(r2);         <span class="comment">// r3: union of r1 and r2</span>
 r3<span class="operator">.</span>isEmpty();               <span class="comment">// false</span></pre>
<!-- @@@isEmpty -->
<!-- $$$rectCount[overload1]$$$rectCount -->
<h3 class="fn"><a name="rectCount"></a><span class="type">int</span> QRegion::<span class="name">rectCount</span> () const</h3>
<p>Returns the number of rectangles that will be returned in <a href="qregion.html#rects">rects</a>().</p>
<p>This function was introduced in Qt 4.6.</p>
<!-- @@@rectCount -->
<!-- $$$rects[overload1]$$$rects -->
<h3 class="fn"><a name="rects"></a><span class="type"><a href="qvector.html">QVector</a></span>&lt;<span class="type"><a href="qrect.html">QRect</a></span>&gt; QRegion::<span class="name">rects</span> () const</h3>
<p>Returns an array of non-overlapping rectangles that make up the region.</p>
<p>The union of all the rectangles is equal to the original region.</p>
<p><b>See also </b><a href="qregion.html#setRects">setRects</a>().</p>
<!-- @@@rects -->
<!-- $$$setRects[overload1]$$$setRectsconstQRect*int -->
<h3 class="fn"><a name="setRects"></a><span class="type">void</span> QRegion::<span class="name">setRects</span> ( const <span class="type"><a href="qrect.html">QRect</a></span> * <i>rects</i>, <span class="type">int</span> <i>number</i> )</h3>
<p>Sets the region using the array of rectangles specified by <i>rects</i> and <i>number</i>. The rectangles <i>must</i> be optimally Y-X sorted and follow these restrictions:</p>
<ul>
<li>The rectangles must not intersect.</li>
<li>All rectangles with a given top coordinate must have the same height.</li>
<li>No two rectangles may abut horizontally (they should be combined into a single wider rectangle in that case).</li>
<li>The rectangles must be sorted in ascending order, with Y as the major sort key and X as the minor sort key.</li>
</ul>
<p><b>See also </b><a href="qregion.html#rects">rects</a>().</p>
<!-- @@@setRects -->
<!-- $$$subtracted[overload1]$$$subtractedconstQRegion& -->
<h3 class="fn"><a name="subtracted"></a><span class="type">QRegion</span> QRegion::<span class="name">subtracted</span> ( const <span class="type">QRegion</span> &amp; <i>r</i> ) const</h3>
<p>Returns a region which is <i>r</i> subtracted from this region.</p>
<p class="centerAlign"><img src="images/rsubtract.png" alt="Region Subtraction" /></p><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>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qregion.html#intersected">intersected</a>(), <a href="qregion.html#united">united</a>(), and <a href="qregion.html#xored">xored</a>().</p>
<!-- @@@subtracted -->
<!-- $$$swap[overload1]$$$swapQRegion& -->
<h3 class="fn"><a name="swap"></a><span class="type">void</span> QRegion::<span class="name">swap</span> ( <span class="type">QRegion</span> &amp; <i>other</i> )</h3>
<p>Swaps region <i>other</i> with this region. This operation is very fast and never fails.</p>
<p>This function was introduced in Qt 4.8.</p>
<!-- @@@swap -->
<!-- $$$translate[overload1]$$$translateintint -->
<h3 class="fn"><a name="translate"></a><span class="type">void</span> QRegion::<span class="name">translate</span> ( <span class="type">int</span> <i>dx</i>, <span class="type">int</span> <i>dy</i> )</h3>
<p>Translates (moves) the region <i>dx</i> along the X axis and <i>dy</i> along the Y axis.</p>
<!-- @@@translate -->
<!-- $$$translate$$$translateconstQPoint& -->
<h3 class="fn"><a name="translate-2"></a><span class="type">void</span> QRegion::<span class="name">translate</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>point</i> )</h3>
<p>This is an overloaded function.</p>
<p>Translates the region <i>point</i><i>.x()</i> along the x axis and <i>point</i><i>.y()</i> along the y axis, relative to the current position. Positive values move the region to the right and down.</p>
<p>Translates to the given <i>point</i>.</p>
<!-- @@@translate -->
<!-- $$$translated[overload1]$$$translatedintint -->
<h3 class="fn"><a name="translated"></a><span class="type">QRegion</span> QRegion::<span class="name">translated</span> ( <span class="type">int</span> <i>dx</i>, <span class="type">int</span> <i>dy</i> ) const</h3>
<p>Returns a copy of the region that is translated <i>dx</i> along the x axis and <i>dy</i> along the y axis, relative to the current position. Positive values move the region to the right and down.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qregion.html#translate">translate</a>().</p>
<!-- @@@translated -->
<!-- $$$translated$$$translatedconstQPoint& -->
<h3 class="fn"><a name="translated-2"></a><span class="type">QRegion</span> QRegion::<span class="name">translated</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>p</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns a copy of the regtion that is translated <i>p</i><i>.x()</i> along the x axis and <i>p</i><i>.y()</i> along the y axis, relative to the current position. Positive values move the rectangle to the right and down.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qregion.html#translate">translate</a>().</p>
<!-- @@@translated -->
<!-- $$$united[overload1]$$$unitedconstQRegion& -->
<h3 class="fn"><a name="united"></a><span class="type">QRegion</span> QRegion::<span class="name">united</span> ( const <span class="type">QRegion</span> &amp; <i>r</i> ) const</h3>
<p>Returns a region which is the union of this region and <i>r</i>.</p>
<p class="centerAlign"><img src="images/runion.png" alt="Region Union" /></p><p>The figure shows the union of two elliptical regions.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qregion.html#intersected">intersected</a>(), <a href="qregion.html#subtracted">subtracted</a>(), and <a href="qregion.html#xored">xored</a>().</p>
<!-- @@@united -->
<!-- $$$united$$$unitedconstQRect& -->
<h3 class="fn"><a name="united-2"></a><span class="type">QRegion</span> QRegion::<span class="name">united</span> ( const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>rect</i> ) const</h3>
<p>Returns a region which is the union of this region and the given <i>rect</i>.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qregion.html#intersected">intersected</a>(), <a href="qregion.html#subtracted">subtracted</a>(), and <a href="qregion.html#xored">xored</a>().</p>
<!-- @@@united -->
<!-- $$$xored[overload1]$$$xoredconstQRegion& -->
<h3 class="fn"><a name="xored"></a><span class="type">QRegion</span> QRegion::<span class="name">xored</span> ( const <span class="type">QRegion</span> &amp; <i>r</i> ) const</h3>
<p>Returns a region which is the exclusive or (XOR) of this region and <i>r</i>.</p>
<p class="centerAlign"><img src="images/rxor.png" alt="Region XORed" /></p><p>The figure shows the exclusive or of two elliptical regions.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qregion.html#intersected">intersected</a>(), <a href="qregion.html#united">united</a>(), and <a href="qregion.html#subtracted">subtracted</a>().</p>
<!-- @@@xored -->
<!-- $$$operator QVariant[overload1]$$$operator QVariant -->
<h3 class="fn"><a name="operator-QVariant"></a>QRegion::<span class="name">operator QVariant</span> () const</h3>
<p>Returns the region as a <a href="qvariant.html">QVariant</a></p>
<!-- @@@operator QVariant -->
<!-- $$$operator!=[overload1]$$$operator!=constQRegion& -->
<h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> QRegion::<span class="name">operator!=</span> ( const <span class="type">QRegion</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this region is different from the <i>other</i> region; otherwise returns false.</p>
<!-- @@@operator!= -->
<!-- $$$operator&[overload1]$$$operator&constQRegion& -->
<h3 class="fn"><a name="operator-and"></a>const <span class="type">QRegion</span> QRegion::<span class="name">operator&amp;</span> ( const <span class="type">QRegion</span> &amp; <i>r</i> ) const</h3>
<p>Applies the <a href="qregion.html#intersected">intersected</a>() function to this region and <i>r</i>. <tt>r1&amp;r2</tt> is equivalent to <tt>r1.intersected(r2)</tt>.</p>
<p><b>See also </b><a href="qregion.html#intersected">intersected</a>().</p>
<!-- @@@operator& -->
<!-- $$$operator&$$$operator&constQRect& -->
<h3 class="fn"><a name="operator-and-2"></a>const <span class="type">QRegion</span> QRegion::<span class="name">operator&amp;</span> ( const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>r</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>This function was introduced in Qt 4.4.</p>
<!-- @@@operator& -->
<!-- $$$operator&=[overload1]$$$operator&=constQRegion& -->
<h3 class="fn"><a name="operator-and-eq"></a><span class="type">QRegion</span> &amp; QRegion::<span class="name">operator&amp;=</span> ( const <span class="type">QRegion</span> &amp; <i>r</i> )</h3>
<p>Applies the <a href="qregion.html#intersected">intersected</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</tt> = r1.intersected(r2).</p>
<p><b>See also </b><a href="qregion.html#intersected">intersected</a>().</p>
<!-- @@@operator&= -->
<!-- $$$operator&=$$$operator&=constQRect& -->
<h3 class="fn"><a name="operator-and-eq-2"></a><span class="type">QRegion</span> &amp; QRegion::<span class="name">operator&amp;=</span> ( const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>r</i> )</h3>
<p>This is an overloaded function.</p>
<p>This function was introduced in Qt 4.4.</p>
<!-- @@@operator&= -->
<!-- $$$operator+[overload1]$$$operator+constQRegion& -->
<h3 class="fn"><a name="operator-2b"></a>const <span class="type">QRegion</span> QRegion::<span class="name">operator+</span> ( const <span class="type">QRegion</span> &amp; <i>r</i> ) const</h3>
<p>Applies the <a href="qregion.html#united">united</a>() function to this region and <i>r</i>. <tt>r1+r2</tt> is equivalent to <tt>r1.united(r2)</tt>.</p>
<p><b>See also </b><a href="qregion.html#united">united</a>() and <a href="qregion.html#operator-7c">operator|</a>().</p>
<!-- @@@operator+ -->
<!-- $$$operator+$$$operator+constQRect& -->
<h3 class="fn"><a name="operator-2b-2"></a>const <span class="type">QRegion</span> QRegion::<span class="name">operator+</span> ( const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>r</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>This function was introduced in Qt 4.4.</p>
<!-- @@@operator+ -->
<!-- $$$operator+=[overload1]$$$operator+=constQRegion& -->
<h3 class="fn"><a name="operator-2b-eq"></a><span class="type">QRegion</span> &amp; QRegion::<span class="name">operator+=</span> ( const <span class="type">QRegion</span> &amp; <i>r</i> )</h3>
<p>Applies the <a href="qregion.html#united">united</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.united(r2)</tt>.</p>
<p><b>See also </b><a href="qregion.html#intersected">intersected</a>().</p>
<!-- @@@operator+= -->
<!-- $$$operator+=$$$operator+=constQRect& -->
<h3 class="fn"><a name="operator-2b-eq-2"></a><span class="type">QRegion</span> &amp; QRegion::<span class="name">operator+=</span> ( const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>rect</i> )</h3>
<p>Returns a region that is the union of this region with the specified <i>rect</i>.</p>
<p><b>See also </b><a href="qregion.html#united">united</a>().</p>
<!-- @@@operator+= -->
<!-- $$$operator-[overload1]$$$operator-constQRegion& -->
<h3 class="fn"><a name="operator-"></a>const <span class="type">QRegion</span> QRegion::<span class="name">operator-</span> ( const <span class="type">QRegion</span> &amp; <i>r</i> ) const</h3>
<p>Applies the <a href="qregion.html#subtracted">subtracted</a>() function to this region and <i>r</i>. <tt>r1-r2</tt> is equivalent to <tt>r1.subtracted(r2)</tt>.</p>
<p><b>See also </b><a href="qregion.html#subtracted">subtracted</a>().</p>
<!-- @@@operator- -->
<!-- $$$operator-=[overload1]$$$operator-=constQRegion& -->
<h3 class="fn"><a name="operator--eq"></a><span class="type">QRegion</span> &amp; QRegion::<span class="name">operator-=</span> ( const <span class="type">QRegion</span> &amp; <i>r</i> )</h3>
<p>Applies the <a href="qregion.html#subtracted">subtracted</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.subtracted(r2)</tt>.</p>
<p><b>See also </b><a href="qregion.html#subtracted">subtracted</a>().</p>
<!-- @@@operator-= -->
<!-- $$$operator=[overload1]$$$operator=constQRegion& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">QRegion</span> &amp; QRegion::<span class="name">operator=</span> ( const <span class="type">QRegion</span> &amp; <i>r</i> )</h3>
<p>Assigns <i>r</i> to this region and returns a reference to the region.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQRegion& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QRegion::<span class="name">operator==</span> ( const <span class="type">QRegion</span> &amp; <i>r</i> ) const</h3>
<p>Returns true if the region is equal to <i>r</i>; otherwise returns false.</p>
<!-- @@@operator== -->
<!-- $$$operator^[overload1]$$$operator^constQRegion& -->
<h3 class="fn"><a name="operator-5e"></a>const <span class="type">QRegion</span> QRegion::<span class="name">operator^</span> ( const <span class="type">QRegion</span> &amp; <i>r</i> ) const</h3>
<p>Applies the <a href="qregion.html#xored">xored</a>() function to this region and <i>r</i>. <tt>r1^r2</tt> is equivalent to <tt>r1.xored(r2)</tt>.</p>
<p><b>See also </b><a href="qregion.html#xored">xored</a>().</p>
<!-- @@@operator^ -->
<!-- $$$operator^=[overload1]$$$operator^=constQRegion& -->
<h3 class="fn"><a name="operator-5e-eq"></a><span class="type">QRegion</span> &amp; QRegion::<span class="name">operator^=</span> ( const <span class="type">QRegion</span> &amp; <i>r</i> )</h3>
<p>Applies the <a href="qregion.html#xored">xored</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.xored(r2)</tt>.</p>
<p><b>See also </b><a href="qregion.html#xored">xored</a>().</p>
<!-- @@@operator^= -->
<!-- $$$operator|[overload1]$$$operator|constQRegion& -->
<h3 class="fn"><a name="operator-7c"></a>const <span class="type">QRegion</span> QRegion::<span class="name">operator|</span> ( const <span class="type">QRegion</span> &amp; <i>r</i> ) const</h3>
<p>Applies the <a href="qregion.html#united">united</a>() function to this region and <i>r</i>. <tt>r1|r2</tt> is equivalent to <tt>r1.united(r2)</tt>.</p>
<p><b>See also </b><a href="qregion.html#united">united</a>() and <a href="qregion.html#operator-2b">operator+</a>().</p>
<!-- @@@operator| -->
<!-- $$$operator|=[overload1]$$$operator|=constQRegion& -->
<h3 class="fn"><a name="operator-7c-eq"></a><span class="type">QRegion</span> &amp; QRegion::<span class="name">operator|=</span> ( const <span class="type">QRegion</span> &amp; <i>r</i> )</h3>
<p>Applies the <a href="qregion.html#united">united</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.united(r2)</tt>.</p>
<p><b>See also </b><a href="qregion.html#united">united</a>().</p>
<!-- @@@operator|= -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$operator<<$$$operator<<QDataStream&constQRegion& -->
<h3 class="fn"><a name="operator-lt-lt-45"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <span class="name">operator&lt;&lt;</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <i>s</i>, const <span class="type">QRegion</span> &amp; <i>r</i> )</h3>
<p>Writes the region <i>r</i> to the stream <i>s</i> and returns a reference to the stream.</p>
<p><b>See also </b><a href="datastreamformat.html">Format of the QDataStream operators</a>.</p>
<!-- @@@operator<< -->
<!-- $$$operator>>$$$operator>>QDataStream&QRegion& -->
<h3 class="fn"><a name="operator-gt-gt-27"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <span class="name">operator&gt;&gt;</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <i>s</i>, <span class="type">QRegion</span> &amp; <i>r</i> )</h3>
<p>Reads a region from the stream <i>s</i> into <i>r</i> and returns a reference to the stream.</p>
<p><b>See also </b><a href="datastreamformat.html">Format of the QDataStream operators</a>.</p>
<!-- @@@operator>> -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Qt and respective logos are trademarks of The Qt Company Ltd 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>