1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
<!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">TintMode</div><br><div class="">Renders the bitmap tinted to a color.
<br>
<br><div class="Surrounded"><table><tr valign="top"><td align="right"><div class="FuncDef"><strong><a href="../RenderMode/TintMode.html"><font color="#0000CC">TintMode</font></a>(</strong></div></td><td><div class="FuncDef"><strong><a href="../Rgba.html"><font color="#0000CC">Rgba</font></a> color );
<br></strong></div></td></tr></table>
<br>The bitmap will be tinted to the given color.The alpha value of the color tells the intensity of the tinting.
<br></div>
<br>Like any other RenderMode the instance of TintMode is deleted after it's passed to a rendering function. This is to allow for passing a new object to the rendering function without having to worry about destroying it. See the examples of how this works.
<br>
<br>If you don't wish the TintMode to be deleted after using it you can call the NoAutoDestroy() -method.
<br>
<br>Note that only one TintMode can take effect at a time!</div><br><div class="MediumHeader">Examples</div><br><div class="Code"><font color="#999922">// Load a bitmap //</font>
<br><a href="../Bitmap.html"><font color="#0000CC">Bitmap</font></a> myBmp( ... );
<br>
<br><font color="#999922">// Render the bitmap to the screen such as the top-left corner is at x = 200.0, y = 100.0 //</font>
<br><font color="#999922">// and the bitmap is tinted 35% to red //</font>
<br>myBmp.<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/TintMode.html"><font color="#0000CC">TintMode</font></a>( <a href="../Rgba.html"><font color="#0000CC">Rgba</font></a>( <font color="#994400">1.0</font>, <font color="#994400">0.0</font>, <font color="#994400">0.0</font>, <font color="#994400">0.35</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 TintMode? Click <a href="http://crystalstorm.ath.cx/index.php?lan=en&page=CreateFeedback&subject=TintMode">here.</a></div></td></tr></table></body></html>
|