BlitStretched
Draws the bitmap to the screen stretched to the specified width and height at the specified top-left coordinates.
The same as above but the specified RenderMode affects the way the Bitmap is rendered. Coordinates and dimensions are in pixels. 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. All transformations like stretching use anti-aliased routines by default. Use the Settings if you prefer aliased transformations instead. 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 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 width = 70.0 and height = 50.0 pixels // playerBmp.BlitStretched( 200.0, 100.0, 70.0, 50.0 ); // Draw the bitmap at the same position but this time // // stretched to double the original size of the bitmap // playerBmp.BlitStretched( 200.0, 100.0, 2.0 * playerBmp.Width(), 2.0 * playerBmp.Height() ); Other functions of the class Bitmap
Questions about BlitStretched? Click here. |