1 2 3 4 5 6 7 8 9 10 11 12
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transistional//EN"><html><head><title>OpenLayer Offline Manual</title><style type="text/css" media="all">@import "../CrystalStyle.css";</style><body bgcolor="FFFFFF" ><div align="center" style="pagestyle"><table width="60%"><tr><td><div class="BigHeader">ClippedMode</div><br><div class=""><div class="Surrounded"><table><tr valign="top"><td align="right"><div class="FuncDef"><strong><a href="../RenderMode/ClippedMode.html"><font color="#0000CC">ClippedMode</font></a>(</strong></div></td><td><div class="FuncDef"><strong><font color="#777733">float</font> x, <font color="#777733">float</font> y, <font color="#777733">float</font> w, <font color="#777733">float</font> h );
<br></strong></div></td></tr></table>
<br>When the <a href="../Bitmap.html"><font color="#0000CC">Bitmap</font></a> is rendered it's clipped to the specified region.
<br></div>
<br>The parts of the Bitmap which fall outside of the clipping region won't be visible. In the blitting functions the top-left corner of the Bitmap will be considered to be the top-left corner of the clipping region inside the Bitmap.</div><br><div class="MediumHeader">Examples</div><br><div class="Code"><a href="../Bitmap.html"><font color="#0000CC">Bitmap</font></a> bmp( ... );
<br>
<br><font color="#999922">// Render the Bitmap clipped to the width of 70.0 and the height of 50.0 //</font>
<br>bmp.<a href="../Bitmap/Blit.html"><font color="#0000CC">Blit</font></a>( <font color="#994400">200.0</font>, <font color="#994400">100.0</font>, <a href="../RenderMode/ClippedMode.html"><font color="#0000CC">ClippedMode</font></a>( <font color="#994400">0.0</font>, <font color="#994400">0.0</font>, <font color="#994400">70.0</font>, <font color="#994400">50.0</font> ));
<br>
<br><font color="#999922">// Render the Bitmap clipped to the same width and height but such that //</font>
<br><font color="#999922">// the top-left corner of the clipping region is at 20.0, 10.0 //</font>
<br>bmp.<a href="../Bitmap/Blit.html"><font color="#0000CC">Blit</font></a>( <font color="#994400">200.0</font>, <font color="#994400">100.0</font>, <a href="../RenderMode/ClippedMode.html"><font color="#0000CC">ClippedMode</font></a>( <font color="#994400">20.0</font>, <font color="#994400">10.0</font>, <font color="#994400">70.0</font>, <font color="#994400">50.0</font> ));</div><div class=""><br><br><div class="MediumHeader">Parent Class</div><div class="Surrounded"><a href="../RenderMode.html">RenderMode</a></div><br><div class=""><a href="../index.html">Back to the main page of the manual</a></div><br>Questions about ClippedMode? Click <a href="http://crystalstorm.ath.cx/index.php?lan=en&page=CreateFeedback&subject=ClippedMode">here.</a></div></td></tr></table></body></html>
|