BlitTransformed
Draws the bitmap to the screen stretched to the specified width and height and rotated clockwise around its centre. The centre of the bitmap will be positioned in the screen at the given x and y -coordinates.
The same as above but the specified RenderMode affects the way the Bitmap is rendered.
Draws the bitmap to the screen stretched to the specified width and height and rotated clockwise around the point (pivotX, pivotY) in the bitmap. The pivot point will be positioned in the screen at the given x and y -coordinates.
The same as above but the specified RenderMode affects the way the Bitmap is rendered. Coordinates and dimensions 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. 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. All transformations like rotation and stretching use anti-aliased routines by default. Use the Settings if you prefer aliased transformations instead. BlitTransformed, 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 Bitmap. Examples // Load a bitmap from an image file //
Bitmap playerBmp( "Player.png" ); // Draw the bitmap to the screen such that the top-left corner of the bitmap // // is positioned at x = 200.0, y = 100.0 and the bitmap is stretched to // // half the original size and rotated anti-clockwise pi/4 radians (90 decrees) // playerBmp.BlitTransformed( 200.0, 100.0, playerBmp.Width()/2, playerBmp.Height()/2, AL_PI/4.0 ); Other functions of the class Bitmap
Questions about BlitTransformed? Click here. |