1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
<!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="parentLinks"><a href="../index.html">OpenLayer</a> | <a href="../RenderMode.html">RenderMode</a> | <a href="../RenderMode/AlphaFrom.html">AlphaFrom</a></div><br><div class="BigHeader">AlphaFrom</div><br><div class=""><div class="Surrounded"><table><tr valign="top"><td align="right"><div class="FuncDef"><strong><a href="../RenderMode/AlphaFrom.html"><font color="#0000CC">AlphaFrom</font></a>(</strong></div></td><td><div class="FuncDef"><strong><font color="#777733">const</font> <a href="../Bitmap.html"><font color="#0000CC">Bitmap</font></a> &alphaFrom, <font color="#777733">float</font> anchorX = <font color="#994400">0.0</font>,
<br><font color="#777733">float</font> anchorY = <font color="#994400">0.0</font> );
<br></strong></div></td></tr></table>
<br>The <a href="../Bitmap.html"><font color="#0000CC">Bitmap</font></a> will be rendered with an additional alpha channel from an another Bitmap.
<br></div>
<br>The values of the alpha channels are multiplied together to get the final value.
<br>
<br>The results are clipped to the areas of both of the Bitmaps. This effectively means that the parts outside the alphaFrom Bitmap are considered to be transparent.
<br>
<br>Note that only one GainAlphaMode can take effect at a time!</div><br><div class="MediumHeader">Examples</div><br><div class="Code"><a href="../Bitmap.html"><font color="#0000CC">Bitmap</font></a> myBmp( ... ), alphaBmp( ... );
<br>
<br><font color="#999922">// Render myBmp with an extra alpha channel from alphaBmp //</font>
<br><font color="#999922">// The alpha channel is positioned inside myBmp at x = 20.0, y = 10.0 //</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/AlphaFrom.html"><font color="#0000CC">AlphaFrom</font></a>( alphaBmp, <font color="#994400">20.0</font>, <font color="#994400">10.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 AlphaFrom? Click <a href="http://crystalstorm.ath.cx/index.php?lan=en&page=CreateFeedback&subject=AlphaFrom">here.</a></div></td></tr></table></body></html>
|