BlitDistorted
Draws the bitmap such that the given coordinates describe the positions of the corner points of the bitmap in the screen. Coordinates are given in a clockwise order starting from the top-left coordinate. The bitmap will be stretched to fill the quadrate area inside the corner points.
The same as above but the specified RenderMode affects the way the Bitmap is rendered. Coordinates 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. BlitDistorted, 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 coordinate // // of the bitmap will be at x = 200, y = 100, the top-right coordinate // // will be at x = 300, y = 100, the bottom-right coordinate will be at // // x = 330, y = 200 and the bottom-left coordinate will be at x = 170, y = 200 // // The bitmap will look like this: /_\ // playerBmp.BlitDistorted( 200.0, 100.0, 300.0, 100.0, 330.0, 200.0, 170.0, 200.0 ); Other functions of the class Bitmap
Questions about BlitDistorted? Click here. |