1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
<!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="../Bitmap.html">Bitmap</a> | <a href="../Bitmap/BlitRotated.html">BlitRotated</a></div><br><div class="BigHeader">BlitRotated</div><br><div class=""><div class="Surrounded"><table><tr valign="top"><td align="right"><div class="FuncDef"><strong><font color="#777733">void</font> <a href="../Bitmap/BlitRotated.html"><font color="#0000CC">BlitRotated</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> angle, <font color="#777733">float</font> opacity = <font color="#994400">1.0</font> ) <font color="#777733">const</font>;
<br></strong></div></td></tr></table>
<br>Draws the bitmap to the screen rotated anti-clockwise around its centre. The centre of the bitmap will be positioned in the screen at the given x and y -coordinates.
<br></div>
<br><div class="Surrounded"><table><tr valign="top"><td align="right"><div class="FuncDef"><strong><font color="#777733">void</font> <a href="../Bitmap/BlitRotated.html"><font color="#0000CC">BlitRotated</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> angle,
<br><font color="#777733">const</font> <a href="../RenderMode.html"><font color="#0000CC">RenderMode</font></a> &mode, <font color="#777733">float</font> opacity = <font color="#994400">1.0</font> ) <font color="#777733">const</font>;
<br></strong></div></td></tr></table>
<br>The same as above but the specified RenderMode affects the way the Bitmap is rendered.
<br></div>
<br><div class="Surrounded"><table><tr valign="top"><td align="right"><div class="FuncDef"><strong><font color="#777733">void</font> <a href="../Bitmap/BlitRotated.html"><font color="#0000CC">BlitRotated</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> pivotX, <font color="#777733">float</font> pivotY,
<br><font color="#777733">float</font> angle, <font color="#777733">float</font> opacity = <font color="#994400">1.0</font> ) <font color="#777733">const</font>;
<br></strong></div></td></tr></table>
<br>Draws the bitmap to the screen rotated clockwise around the point (pivotX, pivotY) in the bitmap. The pivot point will be positioned at the given x and y -coordinates in the screen.
<br></div>
<br><div class="Surrounded"><table><tr valign="top"><td align="right"><div class="FuncDef"><strong><font color="#777733">void</font> <a href="../Bitmap/BlitRotated.html"><font color="#0000CC">BlitRotated</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> pivotX, <font color="#777733">float</font> pivotY,
<br><font color="#777733">float</font> angle, <font color="#777733">const</font> <a href="../RenderMode.html"><font color="#0000CC">RenderMode</font></a> &mode,
<br><font color="#777733">float</font> opacity = <font color="#994400">1.0</font> ) <font color="#777733">const</font>;
<br></strong></div></td></tr></table>
<br>The same as above but the specified RenderMode affects the way the Bitmap is rendered.
<br></div>
<br>Coordinates are in pixels and the angle is in radians. Opacity should be between 0.0 and 1.0, where 1.0 is completely opaque and 0.0 completely transparent. Notice that if you don't pass any opacity parameter the bitmap will be rendered fully opaque.
<br>
<br>If you pass true to horizontallyFlipped the bitmap will be drawn to the screen horizontally flipped. Note that the bitmap will always be placed so that the pivot point is positioned at the given coordinates, even if the bitmap is flipped.
<br>
<br>All transformations like rotation use anti-aliased routines by default. Use the <a href="../Settings.html"><font color="#0000CC">Settings</font></a> if you prefer aliased transformations instead.
<br>
<br>BlitRotated, like any other bitmap rendering function, will take the alpha channel of the bitmap in account. With the default blender the alpha channel describes the opacity of every single pixel in the bitmap. The higher alpha value, the more visible the pixel is. Read more about the alpha channel in the definition of <a href="../Bitmap.html"><font color="#0000CC">Bitmap</font></a>.</div><br><div class="MediumHeader">Examples</div><br><div class="Code"><font color="#999922">// Load a bitmap from an image file //</font>
<br><a href="../Bitmap.html"><font color="#0000CC">Bitmap</font></a> playerBmp( <font color="#CC0000">"Player.png"</font> );
<br>
<br><font color="#999922">// Draw the bitmap to the screen such that the top-left corner //</font>
<br><font color="#999922">// of the bitmap is positioned at x = 200.0, y = 100.0 //</font>
<br><font color="#999922">// and the bitmap is rotated clockwise pi/4 radians (45 decrees) //</font>
<br>playerBmp.<a href="../Bitmap/BlitRotated.html"><font color="#0000CC">BlitRotated</font></a>( <font color="#994400">200.0</font>, <font color="#994400">100.0</font>, AL_PI/<font color="#994400">4.0</font> );
<br>
<br><font color="#999922">// Draw the bitmap at the same position and rotated similiarily //</font>
<br><font color="#999922">// but this time around the top-left corner of the bitmap //</font>
<br>playerBmp.<a href="../Bitmap/BlitRotated.html"><font color="#0000CC">BlitRotated</font></a>( <font color="#994400">200.0</font>, <font color="#994400">100.0</font>, <font color="#994400">0.0</font>, <font color="#994400">0.0</font>, AL_PI/<font color="#994400">4.0</font> );
<br>
<br><font color="#999922">// Draw the bitmap at the same position and rotated similiarily as in the first example //</font>
<br><font color="#999922">// but with only 70% opacity. (You can partially "see through" the bitmap like if it was a ghost) //</font>
<br>playerBmp.<a href="../Bitmap/BlitRotated.html"><font color="#0000CC">BlitRotated</font></a>( <font color="#994400">200.0</font>, <font color="#994400">100.0</font>, AL_PI/<font color="#994400">4.0</font>, <font color="#994400">0.70</font> );</div><div class=""><br><br><div class="MediumHeader">Other functions of the class <a href="../Bitmap.html"><font color="#0000CC">Bitmap</font></a></div><div class="Surrounded"><table size="100%" cellpadding="0" cellspacing="0"><tr><td halign="center" class="funclist"><a href="../Bitmap/Load.html">Load</a></td><td width="65%" halign="center"><div class="smalltext">Loads the bitmap</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/Blit.html">Blit</a></td><td width="65%" halign="center"><div class="smalltext">Draws the Bitmap to the screen</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/BlitRotated.html">BlitRotated</a></td><td width="65%" halign="center"><div class="smalltext">Draws the Bitmap to the screen rotated along a point</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/BlitStretched.html">BlitStretched</a></td><td width="65%" halign="center"><div class="smalltext">Draws the Bitmap to the screen stretched to the specified size</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/BlitTransformed.html">BlitTransformed</a></td><td width="65%" halign="center"><div class="smalltext">Draws the Bitmap to the screen rotated and stretched</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/BlitDistorted.html">BlitDistorted</a></td><td width="65%" halign="center"><div class="smalltext">Draws the Bitmap to the screen with the given corner points</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/Width.html">Width</a></td><td width="65%" halign="center"><div class="smalltext">Returns the width of the Bitmap</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/Height.html">Height</a></td><td width="65%" halign="center"><div class="smalltext">Returns the height of the Bitmap</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/LoadListOfBitmaps.html">LoadListOfBitmaps</a></td><td width="65%" halign="center"><div class="smalltext">Loads a list of bitmaps from the disk</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/GetPixel.html">GetPixel</a></td><td width="65%" halign="center"><div class="smalltext">Returns the color value of a pixel</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/Destroy.html">Destroy</a></td><td width="65%" halign="center"><div class="smalltext">Destroys the Bitmap</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/IsValid.html">IsValid</a></td><td width="65%" halign="center"><div class="smalltext">Checks if the Bitmap was loaded correctly</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/Save.html">Save</a></td><td width="65%" halign="center"><div class="smalltext">Saves the Bitmap to disk with the specified filename</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/CopyFromScreen.html">CopyFromScreen</a></td><td width="65%" halign="center"><div class="smalltext">Copies a region of the game window to the Bitmap</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/GetMemoryBitmap.html">GetMemoryBitmap</a></td><td width="65%" halign="center"><div class="smalltext">Returns a memory bitmap copy of (part of) the Bitmap</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/GetCollisionPoly.html">GetCollisionPoly</a></td><td width="65%" halign="center"><div class="smalltext">Returns the generated collision polygon for the Bitmap</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/SetDefaultPivot.html">SetDefaultPivot</a></td><td width="65%" halign="center"><div class="smalltext">Sets the default pivot point</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/GetDefaultPivot.html">GetDefaultPivot</a></td><td width="65%" halign="center"><div class="smalltext">Returns the default pivot point</div></td></tr><tr><td colspan="2"><br><div class="SmallHeader"><font color="#775500">Advanced functions</font></div><br></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/GetPixelPacked.html">GetPixelPacked</a></td><td width="65%" halign="center"><div class="smalltext">
Returns the color value of the specified pixel in a packed integer</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/SendToGPU.html">SendToGPU</a></td><td width="65%" halign="center"><div class="smalltext">Sends the Bitmap to the graphics card</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/UnloadFromGPU.html">UnloadFromGPU</a></td><td width="65%" halign="center"><div class="smalltext">Unloads the Bitmap from the graphics card</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/Select.html">Select</a></td><td width="65%" halign="center"><div class="smalltext">
Selects the Bitmap as the active texture of OpenGL</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/UseAutoDelete.html">UseAutoDelete</a></td><td width="65%" halign="center"><div class="smalltext">
Chooses the Bitmap to be automatically deleted when the program quits</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/HasAlphaChannel.html">HasAlphaChannel</a></td><td width="65%" halign="center"><div class="smalltext">Checks if the Bitmap has an alpha channel</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/StartFastBlitting.html">StartFastBlitting</a></td><td width="65%" halign="center"><div class="smalltext">This function should be called right before using FastBlit</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/FastBlit.html">FastBlit</a></td><td width="65%" halign="center"><div class="smalltext">A faster version of Blit</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/FinishFastBlitting.html">FinishFastBlitting</a></td><td width="65%" halign="center"><div class="smalltext">This function should be called after calling FastBlit</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/UnloadToMemory.html">UnloadToMemory</a></td><td width="65%" halign="center"><div class="smalltext">Unloads the Bitmap from the graphics card keeping the image data saved in the Bitmap</div></td></tr><tr><td halign="center" class="funclist"><a href="../Bitmap/TexturedQuad.html">TexturedQuad</a></td><td width="65%" halign="center"><div class="smalltext">Outputs a raw textured quad to the video card</div></td></tr></table></div><br><div class=""><a href="../index.html">Back to the main page of the manual</a></div><br>Questions about BlitRotated? Click <a href="http://crystalstorm.ath.cx/index.php?lan=en&page=CreateFeedback&subject=BlitRotated">here.</a></div></td></tr></table></body></html>
|