Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > 554fa56029a60daf7aab25253fdab3d8 > files > 50

clanlib0.6-docs-0.6.5-28mdv2008.1.x86_64.rpm


<html>
<head><title>ClanLib Reference: CL_ClipRect</title></head>
<body text=black link=blue vlink=#800080 bgcolor=white topmargin=0 leftmargin=0>
<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td><img border=0 src="../images/eyeheader-main-purple-a.gif" alt="ClanSoft logo" width=525 height=96></td></tr>
<tr bgcolor=#dadada><td align=left valign=top><img border=0 src="../images/eyeheader-main-purple-b.gif" alt="ClanSoft logo" width=190 height=14></td><td align=right valign=top><img border=0 src="../images/clanlib_light.gif" width=42 height=14></td></tr></table>
<table align=center border=0 cellspacing=10> <tr>
<td><a href="entire_class_index.html">Entire Class Index</a></td>
<td><a href="class_index.html">Main Class Index</a></td>
<td><a href="cross_index.html">Cross Index</a></td>
<td><a href="global_index.html">Global Index</a></td>
</table><h1 align=center>Class CL_ClipRect</h1><p>
<b>  Clipping rectangle class in ClanLib.</b><br>
Contained in: <a href="global_index.html">global</a><br>
Derived from:
<i>none</i>
<br>
Derived by:
<i>none</i>
<br>Group: Display (Display 2D)
<p>
#include &lt;ClanLib/display.h&gt;
<p>
<hr noshade>
<table border=0>
<tr><td colspan=3><h3>public function member index:</h3></td>
<tr valign=top><td align=left><h3>Construction:</h3></td>
<tr valign=top><td align=right><tt></tt> </td><td align=right><a href="CL_ClipRect.html#2500"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt></tt> </td><td align=right><a href="CL_ClipRect.html#2501"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a></td><td><tt>(<tt>const</tt> <a href="CL_ClipRect.html#2502"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a>& <tt><font color=blue>rect</font></tt>)</tt>;</td>
<tr valign=top><td align=right><tt></tt> </td><td align=right><a href="CL_ClipRect.html#2502"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a></td><td><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>x1</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>y1</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>x2</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>y2</font></tt>)</tt>;</td>
<tr valign=top><td align=left><h3>Attributes:</h3></td>
<tr valign=top><td align=right><tt><tt><font color=purple>bool</font></tt></tt> </td><td align=right><a href="CL_ClipRect.html#2503"><tt><font color=blue><b>test_clipped</b></font></tt></a></td><td><tt>(<tt>const</tt> <a href="CL_ClipRect.html#2502"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a>& <tt><font color=blue>rect</font></tt>) <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>bool</font></tt></tt> </td><td align=right><a href="CL_ClipRect.html#2504"><tt><font color=blue><b>test_unclipped</b></font></tt></a></td><td><tt>(<tt>const</tt> <a href="CL_ClipRect.html#2502"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a>& <tt><font color=blue>rect</font></tt>) <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>bool</font></tt></tt> </td><td align=right><a href="CL_ClipRect.html#2505"><tt><font color=blue><b>test_all_clipped</b></font></tt></a></td><td><tt>(<tt>const</tt> <a href="CL_ClipRect.html#2502"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a>& <tt><font color=blue>rect</font></tt>) <tt>const</tt></tt>;</td>
<tr valign=top><td align=left><h3>Operations:</h3></td>
<tr valign=top><td align=right><tt><a href="CL_ClipRect.html#2502"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a></tt> </td><td align=right><a href="CL_ClipRect.html#2506"><tt><font color=blue><b>clip</b></font></tt></a></td><td><tt>(<tt>const</tt> <a href="CL_ClipRect.html#2502"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a>& <tt><font color=blue>rect</font></tt>) <tt>const</tt></tt>;</td>
<tr valign=top><td align=left><h3>Operators:</h3></td>
<tr valign=top><td align=right><tt><tt><font color=purple>bool</font></tt></tt> </td><td align=right><a href="CL_ClipRect.html#2507"><tt><font color=black><b>operator</b></font></tt><tt> == </tt></a></td><td><tt>(<tt>const</tt> <a href="CL_ClipRect.html#2502"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a>& <tt><font color=blue>rect</font></tt>) <tt>const</tt></tt>;</td>
<tr><td>&nbsp;</td></table>
<hr noshade>
<h2>Description:</h2>
  This class is used to define clipping regions when drawing graphics to the  backbufffer. This is useful if it is too expensive to update the entire  screen each time - instead you can define a limited area where everything  outside the rectangle should be discarded.<br><br>  The clipping rectangle is used together with the clipping rect functions  in <a href="CL_Display.html">CL_Display</a> and <a href="CL_DisplayCard.html">CL_DisplayCard</a>.<br>  See also: <a href="CL_Display.html">CL_Display</a> - The DisplayCard wrapper class.<br>  See also: <a href="CL_DisplayCard.html">CL_DisplayCard</a> - The DisplayCard class.<br><p>
<hr noshade>
<h2>Function Member Descriptions:</h2>
<a name="2500"><font size=+1><b>CL_ClipRect::CL_ClipRect</b></font></a> -   Constructs an uninitialized clip rectangle.<br>  (x1, y1) and (x2, y2) contain random values, and should be manually  initialized before usage of the clip rect.<br><tt></tt> <a href="CL_ClipRect.html#2500"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2501"><font size=+1><b>CL_ClipRect::CL_ClipRect</b></font></a> -   Copy constructor.<br><tt></tt> <a href="CL_ClipRect.html#2501"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a><tt>(<tt>const</tt> <a href="CL_ClipRect.html#2502"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a>& <tt><font color=blue>rect</font></tt>)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2502"><font size=+1><b>CL_ClipRect::CL_ClipRect</b></font></a> -   Constructs a clipping rectangle from (x1,y1) to (x2,y2).<br>  (x1,y1) - Upper left corner of the rectangle.<br>  (x2,y2) - Lower right corner of the rectangle (not included)<br><tt></tt> <a href="CL_ClipRect.html#2502"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>x1</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>y1</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>x2</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>y2</font></tt>)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2506"><font size=+1><b>CL_ClipRect::clip</b></font></a> -   Clips the given rectangle and returns the result.<br><tt><a href="CL_ClipRect.html#2502"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a></tt> <a href="CL_ClipRect.html#2506"><tt><font color=blue><b>clip</b></font></tt></a><tt>(<tt>const</tt> <a href="CL_ClipRect.html#2502"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a>& <tt><font color=blue>rect</font></tt>) <tt>const</tt></tt>;<br><blockquote>  rect - The rectangle to be clipped.<br>  Returns - The clipped rectangle.</blockquote>
<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2507"><font size=+1><b>CL_ClipRect::operator == </b></font></a> -   Standard C++ == operator.<br><tt><tt><font color=purple>bool</font></tt></tt> <a href="CL_ClipRect.html#2507"><tt><font color=black><b>operator</b></font></tt><tt> == </tt></a><tt>(<tt>const</tt> <a href="CL_ClipRect.html#2502"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a>& <tt><font color=blue>rect</font></tt>) <tt>const</tt></tt>;<br><blockquote>  Returns - True if specified rectangle equals this rectangle.</blockquote>
<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2505"><font size=+1><b>CL_ClipRect::test_all_clipped</b></font></a> -   Tests whether all of the specified rectangle is outside this rectangle.<br><tt><tt><font color=purple>bool</font></tt></tt> <a href="CL_ClipRect.html#2505"><tt><font color=blue><b>test_all_clipped</b></font></tt></a><tt>(<tt>const</tt> <a href="CL_ClipRect.html#2502"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a>& <tt><font color=blue>rect</font></tt>) <tt>const</tt></tt>;<br><blockquote>  rect - The rectangle to be tested.<br>  Returns - True if the entire specified rect is outside this rectangle.</blockquote>
<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2503"><font size=+1><b>CL_ClipRect::test_clipped</b></font></a> -   Tests if the specified rectangle needs to be clipped with this clip rect.<br><tt><tt><font color=purple>bool</font></tt></tt> <a href="CL_ClipRect.html#2503"><tt><font color=blue><b>test_clipped</b></font></tt></a><tt>(<tt>const</tt> <a href="CL_ClipRect.html#2502"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a>& <tt><font color=blue>rect</font></tt>) <tt>const</tt></tt>;<br><blockquote>  rect - The rectangle to be tested.<br>  Returns - True if the passed rectangle needs to be clipped.</blockquote>
<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2504"><font size=+1><b>CL_ClipRect::test_unclipped</b></font></a> -   Tests whether the specified rectangle is entirely contained within this clip rect.<br><tt><tt><font color=purple>bool</font></tt></tt> <a href="CL_ClipRect.html#2504"><tt><font color=blue><b>test_unclipped</b></font></tt></a><tt>(<tt>const</tt> <a href="CL_ClipRect.html#2502"><tt><font color=blue><b>CL_ClipRect</b></font></tt></a>& <tt><font color=blue>rect</font></tt>) <tt>const</tt></tt>;<br><blockquote>  rect - The rectangle to be tested.<br>  Returns - True if the passed rectangle is contained within this rectangle.</blockquote>
<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<hr noshade>
<h2>Variable Member Descriptions:</h2>
<a name="2496"><font size=+1><b>CL_ClipRect::m_x1</b></font></a> -   Min x-coordinate of the rectangle.<br>
<tt><tt><font color=purple>int</font></tt> </tt> <tt><a href="CL_ClipRect.html#2496"><tt><font color=blue>m_x1</font></tt></a>;</tt><hr size="1" width="70%" align="left" noshade="noshade"><br>
<a name="2498"><font size=+1><b>CL_ClipRect::m_x2</b></font></a> -   Max x-coordinate of the rectangle - NOT included in clipping area<br>
<tt><tt><font color=purple>int</font></tt> </tt> <tt><a href="CL_ClipRect.html#2498"><tt><font color=blue>m_x2</font></tt></a>;</tt><hr size="1" width="70%" align="left" noshade="noshade"><br>
<a name="2497"><font size=+1><b>CL_ClipRect::m_y1</b></font></a> -   Min y-coordinate of the rectangle.<br>
<tt><tt><font color=purple>int</font></tt> </tt> <tt><a href="CL_ClipRect.html#2497"><tt><font color=blue>m_y1</font></tt></a>;</tt><hr size="1" width="70%" align="left" noshade="noshade"><br>
<a name="2499"><font size=+1><b>CL_ClipRect::m_y2</b></font></a> -   Max y-coordinate of the rectangle - NOT included in clipping area<br>
<tt><tt><font color=purple>int</font></tt> </tt> <tt><a href="CL_ClipRect.html#2499"><tt><font color=blue>m_y2</font></tt></a>;</tt><hr size="1" width="70%" align="left" noshade="noshade"><br>
<hr noshade>
</body>
</html>