chromium/native_client_sdk/doc_generated/pepper_stable/cpp/classpp_1_1_rect.html

{{+bindTo:partials.standard_nacl_api}}
<h1>pp::Rect Class Reference</h1>
<div id="doxygen-ref">
{{- dummy div to appease doxygen -}}
  <div>
<!-- Generated by Doxygen 1.7.6.1 -->



</div>
<!--header-->
<div class="contents">
<!-- doxytag: class="pp::Rect" -->
<p><a href="classpp_1_1_rect-members.html">List of all members.</a></p>
<h2>
Public Member Functions</h2><table class="memberdecls">

<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a839431b4022e2ebdba8472444035401a">Rect</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a1625c1989e873e231cac08fe0877df4a">Rect</a> (const PP_Rect &amp;rect)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a46617cae1905a1793ecc9ea0d2dd64e6">Rect</a> (int32_t w, int32_t h)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a0d444f7609de3ba609a80c232aa7c857">Rect</a> (int32_t <a class="el" href="classpp_1_1_rect.html#acf8feb9af84a42d30917e2c590eafb33">x</a>, int32_t <a class="el" href="classpp_1_1_rect.html#af84b03d10a656af3bbdabae6e0f37972">y</a>, int32_t w, int32_t h)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#ac2a745a2ef59463bf9f17814035f27dd">Rect</a> (const <a class="el" href="classpp_1_1_size.html">Size</a> &amp;s)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a8c4b37a52ccf96670b6ca1f732af07fe">Rect</a> (const <a class="el" href="classpp_1_1_point.html">Point</a> &amp;origin, const <a class="el" href="classpp_1_1_size.html">Size</a> &amp;<a class="el" href="classpp_1_1_rect.html#ae545e94421d1384fb292b270222b812e">size</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#af8bb88a4f39237b78ff8ebf5f3a429e2">~Rect</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a02e46c92ffedee393caff7ae0f7aca2f">operator PP_Rect</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const PP_Rect &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#adf531599805a31e63098782c3108c0e0">pp_rect</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">PP_Rect &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#af278a4ae7b2a1af26a7cc8d4f0b629e6">pp_rect</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#acf8feb9af84a42d30917e2c590eafb33">x</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#ac5e698050a5de8bcb57847ac876279cc">set_x</a> (int32_t in_x)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#af84b03d10a656af3bbdabae6e0f37972">y</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a99d75f24b47d11e05aadde0bcf11b128">set_y</a> (int32_t in_y)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a102299d70d5cd970298c6de5b8ec260d">width</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#ad8b7a557c0a3b7b09a71cc7da3b8cac3">set_width</a> (int32_t w)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#ab7e196b0fba7f34246bf8106f562ff34">height</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a7f816974533715510bfbe1a77bf09e98">set_height</a> (int32_t h)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpp_1_1_point.html">Point</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#ad4d6b9c43472620d8363cbe091f8c5b3">point</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#aa099aad16ade23466364968d1cfbb68e">set_point</a> (const <a class="el" href="classpp_1_1_point.html">Point</a> &amp;origin)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpp_1_1_size.html">Size</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#ae545e94421d1384fb292b270222b812e">size</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a484a54bc72ce43eae283dd04d5258a42">set_size</a> (const <a class="el" href="classpp_1_1_size.html">Size</a> &amp;s)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a83ecc36b001f2c24d99e3088d1cc45a2">right</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a2554e9d4a85d5741dd3cc4e121a15643">bottom</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#aff9442d9ee78ad390129625379b2103f">SetRect</a> (int32_t <a class="el" href="classpp_1_1_rect.html#acf8feb9af84a42d30917e2c590eafb33">x</a>, int32_t <a class="el" href="classpp_1_1_rect.html#af84b03d10a656af3bbdabae6e0f37972">y</a>, int32_t w, int32_t h)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#ad19e517179cc55db2a16d317d2e8904a">SetRect</a> (const PP_Rect &amp;rect)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a83e4d334a41b6d612f1f18ea958767f7">Inset</a> (int32_t horizontal, int32_t vertical)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a17d964545980ac3ae785ef4484c5315a">Inset</a> (int32_t left, int32_t top, int32_t <a class="el" href="classpp_1_1_rect.html#a83ecc36b001f2c24d99e3088d1cc45a2">right</a>, int32_t <a class="el" href="classpp_1_1_rect.html#a2554e9d4a85d5741dd3cc4e121a15643">bottom</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a3c39cdfe70b05c4cb172848daf4cd093">Offset</a> (int32_t horizontal, int32_t vertical)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a8fdc680fc8d23ca24f5a10ec93db3414">Offset</a> (const <a class="el" href="classpp_1_1_point.html">Point</a> &amp;<a class="el" href="classpp_1_1_rect.html#ad4d6b9c43472620d8363cbe091f8c5b3">point</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a8092af1866d23f91f517058b4f612eb5">IsEmpty</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#aae5394eb09b76d2ef7c9251b1e738a3f">Contains</a> (int32_t point_x, int32_t point_y) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a9386508708c88be8820bd19eedbd1862">Contains</a> (const <a class="el" href="classpp_1_1_point.html">Point</a> &amp;<a class="el" href="classpp_1_1_rect.html#ad4d6b9c43472620d8363cbe091f8c5b3">point</a>) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a419d8b63aafcb6626538969abcc7573a">Contains</a> (const <a class="el" href="classpp_1_1_rect.html">Rect</a> &amp;rect) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a32a682a28a1de0b7fa5793a3660514b0">Intersects</a> (const <a class="el" href="classpp_1_1_rect.html">Rect</a> &amp;rect) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpp_1_1_rect.html">Rect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#af903bf60faa68544372f5a58b00144aa">Intersect</a> (const <a class="el" href="classpp_1_1_rect.html">Rect</a> &amp;rect) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpp_1_1_rect.html">Rect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#ab7f3bfc56fddca606125f806f8752880">Union</a> (const <a class="el" href="classpp_1_1_rect.html">Rect</a> &amp;rect) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpp_1_1_rect.html">Rect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#acb5c5d3c44facb488723c609f95b3d72">Subtract</a> (const <a class="el" href="classpp_1_1_rect.html">Rect</a> &amp;rect) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpp_1_1_rect.html">Rect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#aa6d25f1179956e0ee13467e10d169bbc">AdjustToFit</a> (const <a class="el" href="classpp_1_1_rect.html">Rect</a> &amp;rect) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpp_1_1_point.html">Point</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a86ceef39ee91844a877554a2e72bf49f">CenterPoint</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_rect.html#a2471b9960ecbbb006330cd1bb6d51701">SharesEdgeWith</a> (const <a class="el" href="classpp_1_1_rect.html">Rect</a> &amp;rect) const </td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A 2 dimensional rectangle. </p>
<p>A rectangle is represented by x and y (which identifies the upper-left corner of the rectangle), width, and height. </p>
</div><hr /><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a839431b4022e2ebdba8472444035401a"></a><!-- doxytag: member="pp::Rect::Rect" ref="a839431b4022e2ebdba8472444035401a" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_rect.html#a839431b4022e2ebdba8472444035401a">pp::Rect::Rect</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The default constructor. </p>
<p>Creates a <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code> in the upper-left at 0,0 with height and width of 0. </p>
</div>
</div>
<a class="anchor" id="a1625c1989e873e231cac08fe0877df4a"></a><!-- doxytag: member="pp::Rect::Rect" ref="a1625c1989e873e231cac08fe0877df4a" args="(const PP_Rect &amp;rect)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_rect.html#a839431b4022e2ebdba8472444035401a">pp::Rect::Rect</a> </td>
<td>(</td>
<td class="paramtype">const PP_Rect &amp;&#160;</td>
<td class="paramname"><em>rect</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A constructor accepting a reference to a <code>PP_Rect and</code> converting the <code>PP_Rect</code> to a <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code>. </p>
<p>This is an implicit conversion constructor.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">rect</td><td>A <code>PP_Rect</code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a46617cae1905a1793ecc9ea0d2dd64e6"></a><!-- doxytag: member="pp::Rect::Rect" ref="a46617cae1905a1793ecc9ea0d2dd64e6" args="(int32_t w, int32_t h)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_rect.html#a839431b4022e2ebdba8472444035401a">pp::Rect::Rect</a> </td>
<td>(</td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>w</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>h</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A constructor accepting two int32_t values for width and height and converting them to a <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code> in the upper-left starting coordinate of 0,0. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">w</td><td>An int32_t value representing a width. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">h</td><td>An int32_t value representing a height. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a0d444f7609de3ba609a80c232aa7c857"></a><!-- doxytag: member="pp::Rect::Rect" ref="a0d444f7609de3ba609a80c232aa7c857" args="(int32_t x, int32_t y, int32_t w, int32_t h)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_rect.html#a839431b4022e2ebdba8472444035401a">pp::Rect::Rect</a> </td>
<td>(</td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>y</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>w</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>h</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A constructor accepting four int32_t values for width, height, x, and y. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>An int32_t value representing a horizontal coordinate of a point, starting with 0 as the left-most coordinate. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>An int32_t value representing a vertical coordinate of a point, starting with 0 as the top-most coordinate. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">w</td><td>An int32_t value representing a width. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">h</td><td>An int32_t value representing a height. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ac2a745a2ef59463bf9f17814035f27dd"></a><!-- doxytag: member="pp::Rect::Rect" ref="ac2a745a2ef59463bf9f17814035f27dd" args="(const Size &amp;s)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_rect.html#a839431b4022e2ebdba8472444035401a">pp::Rect::Rect</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_size.html">Size</a> &amp;&#160;</td>
<td class="paramname"><em>s</em></td><td>)</td>
<td><code> [inline, explicit]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A constructor accepting a pointer to a <a class="el" href="classpp_1_1_size.html" title="A size of an object based on width and height.">Size</a> and converting the <code><a class="el" href="classpp_1_1_size.html" title="A size of an object based on width and height.">Size</a></code> to a <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code> in the upper-left starting coordinate of 0,0. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>A pointer to a <code><a class="el" href="classpp_1_1_size.html" title="A size of an object based on width and height.">Size</a></code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a8c4b37a52ccf96670b6ca1f732af07fe"></a><!-- doxytag: member="pp::Rect::Rect" ref="a8c4b37a52ccf96670b6ca1f732af07fe" args="(const Point &amp;origin, const Size &amp;size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_rect.html#a839431b4022e2ebdba8472444035401a">pp::Rect::Rect</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_point.html">Point</a> &amp;&#160;</td>
<td class="paramname"><em>origin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classpp_1_1_size.html">Size</a> &amp;&#160;</td>
<td class="paramname"><em>size</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A constructor accepting a pointer to a <code><a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a></code> representing the origin of the rectangle and a pointer to a <code><a class="el" href="classpp_1_1_size.html" title="A size of an object based on width and height.">Size</a></code> representing the height and width. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">origin</td><td>A pointer to a <code><a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a></code> representing the upper-left starting coordinate. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>A pointer to a <code><a class="el" href="classpp_1_1_size.html" title="A size of an object based on width and height.">Size</a></code> representing the height and width. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="af8bb88a4f39237b78ff8ebf5f3a429e2"></a><!-- doxytag: member="pp::Rect::~Rect" ref="af8bb88a4f39237b78ff8ebf5f3a429e2" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_rect.html#af8bb88a4f39237b78ff8ebf5f3a429e2">pp::Rect::~Rect</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Destructor. </p>
</div>
</div>
<hr /><h2>Member Function Documentation</h2>
<a class="anchor" id="aa6d25f1179956e0ee13467e10d169bbc"></a><!-- doxytag: member="pp::Rect::AdjustToFit" ref="aa6d25f1179956e0ee13467e10d169bbc" args="(const Rect &amp;rect) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_rect.html">Rect</a> <a class="el" href="classpp_1_1_rect.html#aa6d25f1179956e0ee13467e10d169bbc">pp::Rect::AdjustToFit</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_rect.html">Rect</a> &amp;&#160;</td>
<td class="paramname"><em>rect</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="classpp_1_1_rect.html#aa6d25f1179956e0ee13467e10d169bbc" title="AdjustToFit() fits as much of the receiving rectangle within the supplied rectangle as possible...">AdjustToFit()</a> fits as much of the receiving rectangle within the supplied rectangle as possible, returning the result. </p>
<p>For example, if the receiver had a x-location of 2 and a width of 4, and the supplied rectangle had an x-location of 0 with a width of 5, the returned rectangle would have an x-location of 1 with a width of 4.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">rect</td><td>A pointer to a <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code> representing the difference between this rectangle and the receiving rectangle. </dd></dl>
</div>
</div>
<a class="anchor" id="a2554e9d4a85d5741dd3cc4e121a15643"></a><!-- doxytag: member="pp::Rect::bottom" ref="a2554e9d4a85d5741dd3cc4e121a15643" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t <a class="el" href="classpp_1_1_rect.html#a2554e9d4a85d5741dd3cc4e121a15643">pp::Rect::bottom</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getter function to get the upper-bound for the y-coordinates of the rectangle. </p>
<p>Note that this coordinate value is one past the highest xy value of pixels in the rectangle. This loop will access all the pixels in a horizontal line in the rectangle: <code>for (int32_t y = rect.y(); y &lt; rect.bottom(); ++y) {}</code></p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value of y + height for this point. </dd></dl>
</div>
</div>
<a class="anchor" id="a86ceef39ee91844a877554a2e72bf49f"></a><!-- doxytag: member="pp::Rect::CenterPoint" ref="a86ceef39ee91844a877554a2e72bf49f" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_point.html">Point</a> <a class="el" href="classpp_1_1_rect.html#a86ceef39ee91844a877554a2e72bf49f">pp::Rect::CenterPoint</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="classpp_1_1_rect.html#a86ceef39ee91844a877554a2e72bf49f" title="CenterPoint() determines the center of this rectangle.">CenterPoint()</a> determines the center of this rectangle. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code><a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a></code> representing the center of this rectangle. </dd></dl>
</div>
</div>
<a class="anchor" id="aae5394eb09b76d2ef7c9251b1e738a3f"></a><!-- doxytag: member="pp::Rect::Contains" ref="aae5394eb09b76d2ef7c9251b1e738a3f" args="(int32_t point_x, int32_t point_y) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="classpp_1_1_rect.html#aae5394eb09b76d2ef7c9251b1e738a3f">pp::Rect::Contains</a> </td>
<td>(</td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>point_x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>point_y</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="classpp_1_1_rect.html#aae5394eb09b76d2ef7c9251b1e738a3f" title="Contains() determines if the point identified by point_x and point_y falls inside this rectangle...">Contains()</a> determines if the point identified by point_x and point_y falls inside this rectangle. </p>
<p>The point (x, y) is inside the rectangle, but the point (x + width, y + height) is not.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">point_x</td><td>An int32_t value representing a x value. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">point_y</td><td>An int32_t value representing a y value.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the point_x and point_y fall inside the rectangle. </dd></dl>
</div>
</div>
<a class="anchor" id="a9386508708c88be8820bd19eedbd1862"></a><!-- doxytag: member="pp::Rect::Contains" ref="a9386508708c88be8820bd19eedbd1862" args="(const Point &amp;point) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="classpp_1_1_rect.html#aae5394eb09b76d2ef7c9251b1e738a3f">pp::Rect::Contains</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_point.html">Point</a> &amp;&#160;</td>
<td class="paramname"><em>point</em></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="classpp_1_1_rect.html#aae5394eb09b76d2ef7c9251b1e738a3f" title="Contains() determines if the point identified by point_x and point_y falls inside this rectangle...">Contains()</a> determines if the specified point is contained by this rectangle. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">point</td><td>A pointer to a <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a> representing a 2D coordinate.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the point_x and point_y fall inside the rectangle. </dd></dl>
</div>
</div>
<a class="anchor" id="a419d8b63aafcb6626538969abcc7573a"></a><!-- doxytag: member="pp::Rect::Contains" ref="a419d8b63aafcb6626538969abcc7573a" args="(const Rect &amp;rect) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="classpp_1_1_rect.html#aae5394eb09b76d2ef7c9251b1e738a3f">pp::Rect::Contains</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_rect.html">Rect</a> &amp;&#160;</td>
<td class="paramname"><em>rect</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="classpp_1_1_rect.html#aae5394eb09b76d2ef7c9251b1e738a3f" title="Contains() determines if the point identified by point_x and point_y falls inside this rectangle...">Contains()</a> determines if this rectangle contains the specified rectangle. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">rect</td><td>A pointer to a <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the rectangle fall inside this rectangle. </dd></dl>
</div>
</div>
<a class="anchor" id="ab7e196b0fba7f34246bf8106f562ff34"></a><!-- doxytag: member="pp::Rect::height" ref="ab7e196b0fba7f34246bf8106f562ff34" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t <a class="el" href="classpp_1_1_rect.html#ab7e196b0fba7f34246bf8106f562ff34">pp::Rect::height</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getter function for returning the value of height. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value of height for this <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code>. </dd></dl>
</div>
</div>
<a class="anchor" id="a83e4d334a41b6d612f1f18ea958767f7"></a><!-- doxytag: member="pp::Rect::Inset" ref="a83e4d334a41b6d612f1f18ea958767f7" args="(int32_t horizontal, int32_t vertical)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_rect.html#a83e4d334a41b6d612f1f18ea958767f7">pp::Rect::Inset</a> </td>
<td>(</td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>horizontal</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>vertical</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="classpp_1_1_rect.html#a83e4d334a41b6d612f1f18ea958767f7" title="Inset() shrinks the rectangle by a horizontal and vertical distance on all sides.">Inset()</a> shrinks the rectangle by a horizontal and vertical distance on all sides. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">horizontal</td><td>An int32_t value representing a horizontal shrinking distance. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">vertical</td><td>An int32_t value representing a vertical shrinking distance. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a17d964545980ac3ae785ef4484c5315a"></a><!-- doxytag: member="pp::Rect::Inset" ref="a17d964545980ac3ae785ef4484c5315a" args="(int32_t left, int32_t top, int32_t right, int32_t bottom)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_rect.html#a83e4d334a41b6d612f1f18ea958767f7">pp::Rect::Inset</a> </td>
<td>(</td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>left</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>top</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>right</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>bottom</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="classpp_1_1_rect.html#a83e4d334a41b6d612f1f18ea958767f7" title="Inset() shrinks the rectangle by a horizontal and vertical distance on all sides.">Inset()</a> shrinks the rectangle by the specified amount on each side. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">left</td><td>An int32_t value representing a left shrinking distance. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">top</td><td>An int32_t value representing a top shrinking distance. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">right</td><td>An int32_t value representing a right shrinking distance. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">bottom</td><td>An int32_t value representing a bottom shrinking distance. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="af903bf60faa68544372f5a58b00144aa"></a><!-- doxytag: member="pp::Rect::Intersect" ref="af903bf60faa68544372f5a58b00144aa" args="(const Rect &amp;rect) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_rect.html">Rect</a> <a class="el" href="classpp_1_1_rect.html#af903bf60faa68544372f5a58b00144aa">pp::Rect::Intersect</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_rect.html">Rect</a> &amp;&#160;</td>
<td class="paramname"><em>rect</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="classpp_1_1_rect.html#af903bf60faa68544372f5a58b00144aa" title="Intersect() computes the intersection of this rectangle with the given rectangle.">Intersect()</a> computes the intersection of this rectangle with the given rectangle. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">rect</td><td>A pointer to a <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code> representing the intersection. </dd></dl>
</div>
</div>
<a class="anchor" id="a32a682a28a1de0b7fa5793a3660514b0"></a><!-- doxytag: member="pp::Rect::Intersects" ref="a32a682a28a1de0b7fa5793a3660514b0" args="(const Rect &amp;rect) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="classpp_1_1_rect.html#a32a682a28a1de0b7fa5793a3660514b0">pp::Rect::Intersects</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_rect.html">Rect</a> &amp;&#160;</td>
<td class="paramname"><em>rect</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="classpp_1_1_rect.html#a32a682a28a1de0b7fa5793a3660514b0" title="Intersects() determines if this rectangle intersects the specified rectangle.">Intersects()</a> determines if this rectangle intersects the specified rectangle. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">rect</td><td>A pointer to a <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the rectangle intersects this rectangle. </dd></dl>
</div>
</div>
<a class="anchor" id="a8092af1866d23f91f517058b4f612eb5"></a><!-- doxytag: member="pp::Rect::IsEmpty" ref="a8092af1866d23f91f517058b4f612eb5" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="classpp_1_1_rect.html#a8092af1866d23f91f517058b4f612eb5">pp::Rect::IsEmpty</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="classpp_1_1_rect.html#a8092af1866d23f91f517058b4f612eb5" title="IsEmpty() determines if the area of a rectangle is zero.">IsEmpty()</a> determines if the area of a rectangle is zero. </p>
<p>Returns true if the area of the rectangle is zero.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the area of the rectangle is zero. </dd></dl>
</div>
</div>
<a class="anchor" id="a3c39cdfe70b05c4cb172848daf4cd093"></a><!-- doxytag: member="pp::Rect::Offset" ref="a3c39cdfe70b05c4cb172848daf4cd093" args="(int32_t horizontal, int32_t vertical)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_rect.html#a3c39cdfe70b05c4cb172848daf4cd093">pp::Rect::Offset</a> </td>
<td>(</td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>horizontal</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>vertical</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="classpp_1_1_rect.html#a3c39cdfe70b05c4cb172848daf4cd093" title="Offset() moves the rectangle by a horizontal and vertical distance.">Offset()</a> moves the rectangle by a horizontal and vertical distance. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">horizontal</td><td>An int32_t value representing a horizontal move distance. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">vertical</td><td>An int32_t value representing a vertical move distance. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a8fdc680fc8d23ca24f5a10ec93db3414"></a><!-- doxytag: member="pp::Rect::Offset" ref="a8fdc680fc8d23ca24f5a10ec93db3414" args="(const Point &amp;point)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_rect.html#a3c39cdfe70b05c4cb172848daf4cd093">pp::Rect::Offset</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_point.html">Point</a> &amp;&#160;</td>
<td class="paramname"><em>point</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="classpp_1_1_rect.html#a3c39cdfe70b05c4cb172848daf4cd093" title="Offset() moves the rectangle by a horizontal and vertical distance.">Offset()</a> moves the rectangle by a horizontal and vertical distance. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">point</td><td>A pointer to a <code><a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a></code> representing the horizontal and vertical move distances. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a02e46c92ffedee393caff7ae0f7aca2f"></a><!-- doxytag: member="pp::Rect::operator PP_Rect" ref="a02e46c92ffedee393caff7ae0f7aca2f" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">pp::Rect::operator PP_Rect </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>PP_Rect() allows implicit conversion of a <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code> to a <code>PP_Rect</code>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code><a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a></code>. </dd></dl>
</div>
</div>
<a class="anchor" id="ad4d6b9c43472620d8363cbe091f8c5b3"></a><!-- doxytag: member="pp::Rect::point" ref="ad4d6b9c43472620d8363cbe091f8c5b3" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_point.html">Point</a> <a class="el" href="classpp_1_1_rect.html#ad4d6b9c43472620d8363cbe091f8c5b3">pp::Rect::point</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getter function for returning the <code><a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a></code>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code><a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a></code>. </dd></dl>
</div>
</div>
<a class="anchor" id="adf531599805a31e63098782c3108c0e0"></a><!-- doxytag: member="pp::Rect::pp_rect" ref="adf531599805a31e63098782c3108c0e0" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const PP_Rect&amp; <a class="el" href="classpp_1_1_rect.html#adf531599805a31e63098782c3108c0e0">pp::Rect::pp_rect</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getter function for returning the internal <code>PP_Rect</code> struct. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A const reference to the internal <code>PP_Rect</code> struct. </dd></dl>
</div>
</div>
<a class="anchor" id="af278a4ae7b2a1af26a7cc8d4f0b629e6"></a><!-- doxytag: member="pp::Rect::pp_rect" ref="af278a4ae7b2a1af26a7cc8d4f0b629e6" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">PP_Rect&amp; <a class="el" href="classpp_1_1_rect.html#adf531599805a31e63098782c3108c0e0">pp::Rect::pp_rect</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getter function for returning the internal <code>PP_Rect</code> struct. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A mutable reference to the <code>PP_Rect</code> struct. </dd></dl>
</div>
</div>
<a class="anchor" id="a83ecc36b001f2c24d99e3088d1cc45a2"></a><!-- doxytag: member="pp::Rect::right" ref="a83ecc36b001f2c24d99e3088d1cc45a2" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t <a class="el" href="classpp_1_1_rect.html#a83ecc36b001f2c24d99e3088d1cc45a2">pp::Rect::right</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getter function to get the upper-bound for the x-coordinates of the rectangle. </p>
<p>Note that this coordinate value is one past the highest x value of pixels in the rectangle. This loop will access all the pixels in a horizontal line in the rectangle: <code>for (int32_t x = rect.x(); x &lt; rect.right(); ++x) {}</code></p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value of x + width for this point. </dd></dl>
</div>
</div>
<a class="anchor" id="a7f816974533715510bfbe1a77bf09e98"></a><!-- doxytag: member="pp::Rect::set_height" ref="a7f816974533715510bfbe1a77bf09e98" args="(int32_t h)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_rect.html#a7f816974533715510bfbe1a77bf09e98">pp::Rect::set_height</a> </td>
<td>(</td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>h</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Setter function for setting the value of height. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">h</td><td>A new width height. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="aa099aad16ade23466364968d1cfbb68e"></a><!-- doxytag: member="pp::Rect::set_point" ref="aa099aad16ade23466364968d1cfbb68e" args="(const Point &amp;origin)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_rect.html#aa099aad16ade23466364968d1cfbb68e">pp::Rect::set_point</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_point.html">Point</a> &amp;&#160;</td>
<td class="paramname"><em>origin</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Setter function for setting the value of the <code><a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a></code>. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">origin</td><td>A <code><a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a></code> representing the upper-left starting coordinate. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a484a54bc72ce43eae283dd04d5258a42"></a><!-- doxytag: member="pp::Rect::set_size" ref="a484a54bc72ce43eae283dd04d5258a42" args="(const Size &amp;s)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_rect.html#a484a54bc72ce43eae283dd04d5258a42">pp::Rect::set_size</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_size.html">Size</a> &amp;&#160;</td>
<td class="paramname"><em>s</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Setter function for setting the <code><a class="el" href="classpp_1_1_size.html" title="A size of an object based on width and height.">Size</a></code>. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>A pointer to a <code><a class="el" href="classpp_1_1_size.html" title="A size of an object based on width and height.">Size</a></code> representing the height and width. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ad8b7a557c0a3b7b09a71cc7da3b8cac3"></a><!-- doxytag: member="pp::Rect::set_width" ref="ad8b7a557c0a3b7b09a71cc7da3b8cac3" args="(int32_t w)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_rect.html#ad8b7a557c0a3b7b09a71cc7da3b8cac3">pp::Rect::set_width</a> </td>
<td>(</td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>w</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Setter function for setting the value of width. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">w</td><td>A new width value. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ac5e698050a5de8bcb57847ac876279cc"></a><!-- doxytag: member="pp::Rect::set_x" ref="ac5e698050a5de8bcb57847ac876279cc" args="(int32_t in_x)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_rect.html#ac5e698050a5de8bcb57847ac876279cc">pp::Rect::set_x</a> </td>
<td>(</td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>in_x</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Setter function for setting the value of x. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">in_x</td><td>A new x value. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a99d75f24b47d11e05aadde0bcf11b128"></a><!-- doxytag: member="pp::Rect::set_y" ref="a99d75f24b47d11e05aadde0bcf11b128" args="(int32_t in_y)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_rect.html#a99d75f24b47d11e05aadde0bcf11b128">pp::Rect::set_y</a> </td>
<td>(</td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>in_y</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Setter function for setting the value of y. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">in_y</td><td>A new y value. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="aff9442d9ee78ad390129625379b2103f"></a><!-- doxytag: member="pp::Rect::SetRect" ref="aff9442d9ee78ad390129625379b2103f" args="(int32_t x, int32_t y, int32_t w, int32_t h)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_rect.html#aff9442d9ee78ad390129625379b2103f">pp::Rect::SetRect</a> </td>
<td>(</td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>y</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>w</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>h</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Setter function for setting the value of the <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code>. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>A new x value. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>A new y value. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">w</td><td>A new width value. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">h</td><td>A new height value. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ad19e517179cc55db2a16d317d2e8904a"></a><!-- doxytag: member="pp::Rect::SetRect" ref="ad19e517179cc55db2a16d317d2e8904a" args="(const PP_Rect &amp;rect)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_rect.html#aff9442d9ee78ad390129625379b2103f">pp::Rect::SetRect</a> </td>
<td>(</td>
<td class="paramtype">const PP_Rect &amp;&#160;</td>
<td class="paramname"><em>rect</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Setter function for setting the value of the <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code>. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">rect</td><td>A pointer to a <code>PP_Rect</code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a2471b9960ecbbb006330cd1bb6d51701"></a><!-- doxytag: member="pp::Rect::SharesEdgeWith" ref="a2471b9960ecbbb006330cd1bb6d51701" args="(const Rect &amp;rect) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="classpp_1_1_rect.html#a2471b9960ecbbb006330cd1bb6d51701">pp::Rect::SharesEdgeWith</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_rect.html">Rect</a> &amp;&#160;</td>
<td class="paramname"><em>rect</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="classpp_1_1_rect.html#a2471b9960ecbbb006330cd1bb6d51701" title="SharesEdgeWith() determines if this rectangle shares an entire edge (same width or same height) with ...">SharesEdgeWith()</a> determines if this rectangle shares an entire edge (same width or same height) with the given rectangle, and the rectangles do not overlap. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">rect</td><td>A pointer to a <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if this rectangle and supplied rectangle share an edge. </dd></dl>
</div>
</div>
<a class="anchor" id="ae545e94421d1384fb292b270222b812e"></a><!-- doxytag: member="pp::Rect::size" ref="ae545e94421d1384fb292b270222b812e" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_size.html">Size</a> <a class="el" href="classpp_1_1_rect.html#ae545e94421d1384fb292b270222b812e">pp::Rect::size</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getter function for returning the <code><a class="el" href="classpp_1_1_size.html" title="A size of an object based on width and height.">Size</a></code>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The size of the rectangle. </dd></dl>
</div>
</div>
<a class="anchor" id="acb5c5d3c44facb488723c609f95b3d72"></a><!-- doxytag: member="pp::Rect::Subtract" ref="acb5c5d3c44facb488723c609f95b3d72" args="(const Rect &amp;rect) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_rect.html">Rect</a> <a class="el" href="classpp_1_1_rect.html#acb5c5d3c44facb488723c609f95b3d72">pp::Rect::Subtract</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_rect.html">Rect</a> &amp;&#160;</td>
<td class="paramname"><em>rect</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="classpp_1_1_rect.html#acb5c5d3c44facb488723c609f95b3d72" title="Subtract() computes the rectangle resulting from subtracting rect from this Rect.">Subtract()</a> computes the rectangle resulting from subtracting <code>rect</code> from this <a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a>. </p>
<p>If <code>rect</code>does not intersect completely in either the x or y direction, then <code>*this</code> is returned. If <code>rect</code> contains <code>this</code>, then an empty <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code> is returned.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">rect</td><td>A pointer to a <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code> representing the subtraction. </dd></dl>
</div>
</div>
<a class="anchor" id="ab7f3bfc56fddca606125f806f8752880"></a><!-- doxytag: member="pp::Rect::Union" ref="ab7f3bfc56fddca606125f806f8752880" args="(const Rect &amp;rect) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_rect.html">Rect</a> <a class="el" href="classpp_1_1_rect.html#ab7f3bfc56fddca606125f806f8752880">pp::Rect::Union</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_rect.html">Rect</a> &amp;&#160;</td>
<td class="paramname"><em>rect</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="classpp_1_1_rect.html#ab7f3bfc56fddca606125f806f8752880" title="Union() computes the union of this rectangle with the given rectangle.">Union()</a> computes the union of this rectangle with the given rectangle. </p>
<p>The union is the smallest rectangle containing both rectangles.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">rect</td><td>A pointer to a <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code> representing the union. </dd></dl>
</div>
</div>
<a class="anchor" id="a102299d70d5cd970298c6de5b8ec260d"></a><!-- doxytag: member="pp::Rect::width" ref="a102299d70d5cd970298c6de5b8ec260d" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t <a class="el" href="classpp_1_1_rect.html#a102299d70d5cd970298c6de5b8ec260d">pp::Rect::width</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getter function for returning the value of width. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value of width for this <code><a class="el" href="classpp_1_1_rect.html" title="A 2 dimensional rectangle.">Rect</a></code>. </dd></dl>
</div>
</div>
<a class="anchor" id="acf8feb9af84a42d30917e2c590eafb33"></a><!-- doxytag: member="pp::Rect::x" ref="acf8feb9af84a42d30917e2c590eafb33" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t <a class="el" href="classpp_1_1_rect.html#acf8feb9af84a42d30917e2c590eafb33">pp::Rect::x</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getter function for returning the value of x. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value of x for this <code><a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a></code>. </dd></dl>
</div>
</div>
<a class="anchor" id="af84b03d10a656af3bbdabae6e0f37972"></a><!-- doxytag: member="pp::Rect::y" ref="af84b03d10a656af3bbdabae6e0f37972" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t <a class="el" href="classpp_1_1_rect.html#af84b03d10a656af3bbdabae6e0f37972">pp::Rect::y</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getter function for returning the value of y. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value of y for this <code><a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a></code>. </dd></dl>
</div>
</div>
<hr />The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="rect_8h.html">rect.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}