L_ChangeBitmapViewPerspective
#include "l_bitmap.h"
L_INT EXT_FUNCTION L_ChangeBitmapViewPerspective(pDstBitmap, pSrcBitmap, uStructSize, ViewPerspective)
pBITMAPHANDLE pDstBitmap; |
/* pointer to the destination bitmap handle */ |
pBITMAPHANDLE pSrcBitmap; |
/* pointer to the source bitmap handle */ |
L_UINT uStructSize; |
/* size in bytes, of the structure pointed to by pDstBitmap */ |
L_INT ViewPerspective; |
/* desired view perspective */ |
Rotates and flips the bitmap data as necessary to achieve the desired view perspective. The ViewPerspective field in the bitmap handle is changed, and thus, the display is unchanged.
Parameter |
Description |
|
pDstBitmap |
Pointer to the bitmap handle referencing the converted bitmap data. Pass NULL to convert the source bitmap in place. |
|
pSrcBitmap |
Pointer to the bitmap handle referencing the bitmap to convert. |
|
uStructSize |
Size in bytes, of the structure pointed to by pDstBitmap, for versioning. Use sizeof(BITMAPHANDLE). |
|
ViewPerspective |
Desired view perspective. The following are possible values: |
|
|
Constant |
Meaning |
|
TOP_LEFT |
[0] Top-left of image is first in memory. |
|
BOTTOM_LEFT180 |
[1] (Document/Medical only) Same as TOP_RIGHT, which is BOTTOM_LEFT rotated clockwise by 180 degrees. |
|
BOTTOM_LEFT |
[2] Bottom-left of image is first in memory. |
|
TOP_LEFT180 |
[3] (Document/Medical only) Same as BOTTOM_RIGHT, which is TOP_LEFT rotated clockwise by 180 degrees. |
|
RIGHT_TOP |
[4] (Document/Medical only) First row is the right side, first column is top side. |
|
TOP_LEFT90 |
[4] (Document/Medical only) Same as RIGHT_TOP, which is TOP_LEFT rotated clockwise by 90 degrees. |
|
LEFT_TOP |
[5] (Document/Medical only) First row is the left side, first column is the top side |
|
BOTTOM_LEFT90 |
[5] (Document/Medical only) Same as LEFT_TOP, which is BOTTOM_LEFT rotated clockwise by 90 degrees |
|
RIGHT_BOTTOM |
[7] (Document/Medical only) First row is the right side, first column is the bottom side |
|
BOTTOM_LEFT270 |
[7] (Document/Medical only) Same as RIGHT_BOTTOM, which is BOTTOM_LEFT rotated clockwise by 270 degrees |
|
LEFT_BOTTOM |
[8] (Document/Medical only) First row is the left side, first column is top side. |
|
TOP_LEFT270 |
[8] (Document/Medical only) Same as LEFT_BOTTOM, which is TOP_LEFT rotated clockwise by 270 degrees. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
Use this function to change the data and the ViewPerspective field in the bitmap handle. This function does not affect the image display. This can be used to simplify calculations that involve bitmap coordinates. For general information about view perspectives, refer to Accounting for View Perspective.
Required DLLs and Libraries
LTKRN For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Platforms
Windows 95 / 98 / Me, Windows 2000 / XP, Windows CE.
See Also
Functions: |
|
|
|
|
|
Topics: |
Example
/* This example checks the ViewPerspective and if it is not TOP_LEFT, changes it */
BITMAPHANDLE LeadBitmap; /* Bitmap handle that holds the bitmap */
L_LoadBitmap(TEXT("IMAGE1.CMP"), &LeadBitmap, sizeof(BITMAPHANDLE), 0, ORDER_BGR, NULL, NULL);
if ( LeadBitmap.ViewPerspective != TOP_LEFT)
L_ChangeBitmapViewPerspective ( NULL, &LeadBitmap, sizeof(BITMAPHANDLE), TOP_LEFT );