RotateBitmap270

#include "BIDIB.H"

HBITMAP CALLBACK RotateBitmap270(HBITMAP hbitSource)

Description

This function rotates the bitmap 270 degrees, physically, bit by bit, in a counter clockwise direction. A faster rotation is possible by rotating the window's coordinate origin.

Parameters

HBITMAP

hbitSource

Handle to the bitmap to be rotated.

Return values

Handle to the newly created, rotated bitmap. NULL on error.

Programming notes

This function uses three DCs at once, so if it fails, check the number of DCs in current use. Memory is allocated to handle at least one line of the bitmap, and it is freed when exited. The more memory provided, the faster execution proceeds.

Requirements

Header :     Declared in BiDIB.h; include BiDIB.h.

Library :    Use BiDIB.lib.

DLLs :       BiDIB.dll.

Code example

#include "BIDIB.H"

 

HBITMAP hOriginalBitmap, hRotatedBitmap;

// create, or load original bitmap

.

.

.

if ( (hRotatedBitmap = RotateBitmap270(hOriginalBitmap)) == NULL)

{

                // could not rotate bitmap

                // possible not enough memory or too many DCs are in use

}