File: AlphaFrom.html

package info (click to toggle)
openlayer 2.1-2.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 3,392 kB
  • ctags: 2,317
  • sloc: ansic: 10,433; cpp: 9,890; xml: 109; makefile: 90; sh: 36
file content (14 lines) | stat: -rw-r--r-- 2,829 bytes parent folder | download | duplicates (2)
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> &amp;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>&nbsp;myBmp(&nbsp;...&nbsp;),&nbsp;alphaBmp(&nbsp;...&nbsp;);
<br>
<br><font color="#999922">//&nbsp;Render&nbsp;myBmp&nbsp;with&nbsp;an&nbsp;extra&nbsp;alpha&nbsp;channel&nbsp;from&nbsp;alphaBmp&nbsp;//</font>
<br><font color="#999922">//&nbsp;The&nbsp;alpha&nbsp;channel&nbsp;is&nbsp;positioned&nbsp;inside&nbsp;myBmp&nbsp;at&nbsp;x&nbsp;=&nbsp;20.0,&nbsp;y&nbsp;=&nbsp;10.0&nbsp;&nbsp;//</font>
<br>myBmp.<a href="../Bitmap/Blit.html"><font color="#0000CC">Blit</font></a>(&nbsp;<font color="#994400">200.0</font>,&nbsp;<font color="#994400">100.0</font>,&nbsp;<a href="../RenderMode/AlphaFrom.html"><font color="#0000CC">AlphaFrom</font></a>(&nbsp;alphaBmp,&nbsp;<font color="#994400">20.0</font>,&nbsp;<font color="#994400">10.0</font>&nbsp;));</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>