chromium/native_client_sdk/doc_generated/pepper_dev/cpp/classpp_1_1_size.html

{{+bindTo:partials.standard_nacl_api}}
<h1>pp::Size 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::Size" -->
<p><a href="classpp_1_1_size-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_size.html#a5ffffc4488c677716baed27752b6a6c1">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_size.html#aa050f55ab1775d0ee1b0ae174e1495df">Size</a> (const PP_Size &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_size.html#a14a1c612454596e43a94c01da338bc1e">Size</a> (int w, int 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_size.html#aff4a88df9882be410ca78d338d2d87dc">~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_size.html#a72cbb6066dd37615daaa3d3c1a0c595a">operator PP_Size</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const PP_Size &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_size.html#ad61947a5f2a3bbe90dc62c62cc799174">pp_size</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">PP_Size &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_size.html#ae20ce070c015adec8b5411b047db5917">pp_size</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_size.html#af043a504c701e32c504c63b9e91ac500">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_size.html#a104cf1f6a95c1430f7cd15a26815e82a">set_width</a> (int w)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_size.html#a61a68178eefa2589ead95491ac079139">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_size.html#a2805413bf372ad033fcf505c8d3cce34">set_height</a> (int h)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_size.html#ac056add4f1e8b1f90a6e3c65afa4ba3b">GetArea</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_size.html#a25d85979d55798a9b672ca73c1d48222">SetSize</a> (int w, int 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_size.html#a51a74964f27e139003b82aad55dd63f5">Enlarge</a> (int w, int h)</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_size.html#a11e791714686761966773adcc94218bb">IsEmpty</a> () const </td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A size of an object based on width and height. </p>
</div><hr /><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a5ffffc4488c677716baed27752b6a6c1"></a><!-- doxytag: member="pp::Size::Size" ref="a5ffffc4488c677716baed27752b6a6c1" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_size.html#a5ffffc4488c677716baed27752b6a6c1">pp::Size::Size</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. Initializes the width and height to 0. </p>
</div>
</div>
<a class="anchor" id="aa050f55ab1775d0ee1b0ae174e1495df"></a><!-- doxytag: member="pp::Size::Size" ref="aa050f55ab1775d0ee1b0ae174e1495df" args="(const PP_Size &amp;s)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_size.html#a5ffffc4488c677716baed27752b6a6c1">pp::Size::Size</a> </td>
<td>(</td>
<td class="paramtype">const PP_Size &amp;&#160;</td>
<td class="paramname"><em>s</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A constructor accepting a pointer to a <code>PP_Size</code> and converting the <code>PP_Size</code> 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>. </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">s</td><td>A pointer to a <code>PP_Size</code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a14a1c612454596e43a94c01da338bc1e"></a><!-- doxytag: member="pp::Size::Size" ref="a14a1c612454596e43a94c01da338bc1e" args="(int w, int h)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_size.html#a5ffffc4488c677716baed27752b6a6c1">pp::Size::Size</a> </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>w</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#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 int values for width and height and converting them 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>. </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 int value representing a width. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">h</td><td>An int value representing a height. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="aff4a88df9882be410ca78d338d2d87dc"></a><!-- doxytag: member="pp::Size::~Size" ref="aff4a88df9882be410ca78d338d2d87dc" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_size.html#aff4a88df9882be410ca78d338d2d87dc">pp::Size::~Size</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="a51a74964f27e139003b82aad55dd63f5"></a><!-- doxytag: member="pp::Size::Enlarge" ref="a51a74964f27e139003b82aad55dd63f5" args="(int w, int h)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_size.html#a51a74964f27e139003b82aad55dd63f5">pp::Size::Enlarge</a> </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>w</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#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 class="el" href="classpp_1_1_size.html#a51a74964f27e139003b82aad55dd63f5" title="Enlarge() enlarges the size of an object.">Enlarge()</a> enlarges the size of an object. </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 width to add the current width. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">h</td><td>A height to add to the current height. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ac056add4f1e8b1f90a6e3c65afa4ba3b"></a><!-- doxytag: member="pp::Size::GetArea" ref="ac056add4f1e8b1f90a6e3c65afa4ba3b" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="classpp_1_1_size.html#ac056add4f1e8b1f90a6e3c65afa4ba3b">pp::Size::GetArea</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_size.html#ac056add4f1e8b1f90a6e3c65afa4ba3b" title="GetArea() determines the area (width * height).">GetArea()</a> determines the area (width * height). </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The area. </dd></dl>
</div>
</div>
<a class="anchor" id="a61a68178eefa2589ead95491ac079139"></a><!-- doxytag: member="pp::Size::height" ref="a61a68178eefa2589ead95491ac079139" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="classpp_1_1_size.html#a61a68178eefa2589ead95491ac079139">pp::Size::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_size.html" title="A size of an object based on width and height.">Size</a></code>. </dd></dl>
</div>
</div>
<a class="anchor" id="a11e791714686761966773adcc94218bb"></a><!-- doxytag: member="pp::Size::IsEmpty" ref="a11e791714686761966773adcc94218bb" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="classpp_1_1_size.html#a11e791714686761966773adcc94218bb">pp::Size::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_size.html#a11e791714686761966773adcc94218bb" title="IsEmpty() determines if the size is zero.">IsEmpty()</a> determines if the size is zero. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the size is zero. </dd></dl>
</div>
</div>
<a class="anchor" id="a72cbb6066dd37615daaa3d3c1a0c595a"></a><!-- doxytag: member="pp::Size::operator PP_Size" ref="a72cbb6066dd37615daaa3d3c1a0c595a" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">pp::Size::operator PP_Size </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>PP_Size() allows implicit conversion of 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> to a <code>PP_Size</code>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <a class="el" href="classpp_1_1_size.html" title="A size of an object based on width and height.">Size</a>. </dd></dl>
</div>
</div>
<a class="anchor" id="ad61947a5f2a3bbe90dc62c62cc799174"></a><!-- doxytag: member="pp::Size::pp_size" ref="ad61947a5f2a3bbe90dc62c62cc799174" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const PP_Size&amp; <a class="el" href="classpp_1_1_size.html#ad61947a5f2a3bbe90dc62c62cc799174">pp::Size::pp_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 internal <code>PP_Size</code> struct. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A const reference to the internal <code>PP_Size</code> struct. </dd></dl>
</div>
</div>
<a class="anchor" id="ae20ce070c015adec8b5411b047db5917"></a><!-- doxytag: member="pp::Size::pp_size" ref="ae20ce070c015adec8b5411b047db5917" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">PP_Size&amp; <a class="el" href="classpp_1_1_size.html#ad61947a5f2a3bbe90dc62c62cc799174">pp::Size::pp_size</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_Size</code> struct. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A mutable reference to the <code>PP_Size</code> struct. </dd></dl>
</div>
</div>
<a class="anchor" id="a2805413bf372ad033fcf505c8d3cce34"></a><!-- doxytag: member="pp::Size::set_height" ref="a2805413bf372ad033fcf505c8d3cce34" args="(int h)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_size.html#a2805413bf372ad033fcf505c8d3cce34">pp::Size::set_height</a> </td>
<td>(</td>
<td class="paramtype">int&#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 height value. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a104cf1f6a95c1430f7cd15a26815e82a"></a><!-- doxytag: member="pp::Size::set_width" ref="a104cf1f6a95c1430f7cd15a26815e82a" args="(int w)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_size.html#a104cf1f6a95c1430f7cd15a26815e82a">pp::Size::set_width</a> </td>
<td>(</td>
<td class="paramtype">int&#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="a25d85979d55798a9b672ca73c1d48222"></a><!-- doxytag: member="pp::Size::SetSize" ref="a25d85979d55798a9b672ca73c1d48222" args="(int w, int h)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_size.html#a25d85979d55798a9b672ca73c1d48222">pp::Size::SetSize</a> </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>w</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#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 class="el" href="classpp_1_1_size.html#a25d85979d55798a9b672ca73c1d48222" title="SetSize() sets the value of width and height.">SetSize()</a> sets the value of width and height. </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>
<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="af043a504c701e32c504c63b9e91ac500"></a><!-- doxytag: member="pp::Size::width" ref="af043a504c701e32c504c63b9e91ac500" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="classpp_1_1_size.html#af043a504c701e32c504c63b9e91ac500">pp::Size::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_size.html" title="A size of an object based on width and height.">Size</a></code>. </dd></dl>
</div>
</div>
<hr />The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="size_8h.html">size.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}