#include "ltwrappr.h"
L_INT LImageViewerCell::FlipAnnotationContainer(nSubCellIndex, uFlags)
Flips the annotation container.
A zero-based index into the image list attached to the cell. This sub-cell contains the image that contains the annotation container. Pass -2 to refer to the selected sub-cell.
Reserved for future use. Pass 0.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function only flips the annotation container. It does not flip the image itself.
Required DLLs and Libraries
This example will flip the image along with the annotation container if the user click on the image using the left mouse button, and will reserve on the right mouse button, and will rotate on the middle mouse button.
class LImageViewerChild3 :public LImageViewerCell
{
virtual L_INT MouseCallBack(L_UINT uMessage,
pDISPCONTAINERCELLINFO pCellInfo);
};
L_INT LImageViewerChild3::MouseCallBack(L_UINT uMessage,
pDISPCONTAINERCELLINFO pCellInfo)
{
UNREFERENCED_PARAMETER(pCellInfo);
BITMAPHANDLE Bitmap;
LBitmap BitmapHandle;
pBITMAPHANDLE pBitmap;
switch(uMessage)
{
case WM_LBUTTONUP:
{
GetBitmapHandle(pCellInfo->nSubCellIndex, &Bitmap, 0);
BitmapHandle.SetHandle(&Bitmap);
BitmapHandle.Flip();
pBitmap = BitmapHandle.GetHandle();
SetBitmapHandle(pCellInfo->nSubCellIndex, pBitmap, TRUE, 0);
BitmapHandle.SetHandle(NULL, FALSE);
FlipAnnotationContainer(pCellInfo->nSubCellIndex, 0);
}
break;
case WM_MBUTTONUP:
GetBitmapHandle(pCellInfo->nSubCellIndex, &Bitmap, 0);
BitmapHandle.SetHandle(&Bitmap);
BitmapHandle.Reverse();
pBitmap = BitmapHandle.GetHandle();
SetBitmapHandle(pCellInfo->nSubCellIndex, pBitmap, TRUE, 0);
BitmapHandle.SetHandle(NULL, FALSE);
ReverseAnnotationContainer(pCellInfo->nSubCellIndex, 0);
break;
case WM_RBUTTONUP:
L_INT nAngle;
RotateBitmapPerspective(pCellInfo->nSubCellIndex, 90, 0);
GetRotateBitmapPerspectiveAngle(pCellInfo->nSubCellIndex, &nAngle, 0);
RotateAnnotationContainer(pCellInfo->nSubCellIndex, nAngle, 0);
break;
}
return SUCCESS;
}
L_INT LImageViewer_FlipAnnotationContainerExample(LImageViewerCell& ImageViewerCell)
{
ImageViewerCell.EnableMouseCallBack(TRUE);
return SUCCESS;
}