LAnnotation::GetRotateOptions

#include "ltwrappr.h"

L_INT LAnnotation::GetRotateOptions(pRotateOptions, uStructSize)

pANNROTATEOPTIONS pRotateOptions;

/* pointer to a structure */

L_UINT uStructSize;

/* size of the ANNROTATEOPTIONS structure */

Gets the rotation options for the specified annotation object. This function is available in the Document/Medical Toolkits.

Parameter

Description

pRotateOptions

Pointer to an ANNROTATEOPTIONS structure that specifies the rotate options to be set.

uStructSize

Size in bytes, of the structure pointed to by pRotateOptions, for versioning. Use sizeof(ANNROTATEOPTIONS).

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function is one of the new functions being introduced as part of Version 14.5. Use this function to get the rotation options of any annotation object, including the automation object. To use this function, declare a variable a type ANNROTATEOPTIONS, and pass the address of this variable as the second argument. For more information, refer to the documentation for the structure ANNROTATEOPTIONS.

For Version 14.5, this functionality can be enabled using the following code snippet:

L_VOID ExampleEnableOption(LAnnAutomation& annAutomation)
{
   L_UINT nRet, uOptions = 0;
   nRet = annAutomation.GetOptions( &uOptions);
   nRet = annAutomation.SetOptions( uOptions | OPTIONS_NEW_ROTATE);
}

Required DLLs and Libraries

LTANN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LAnnotation::SetRotateOptions, LAnnContainer::HitTestExt, LAnnotation::SetOptions, LAnnotation::IsSelected, LAnnotation::SetSelected, LAnnAutomation::SetAutoCursor

Topics:

Annotation Functions: (Document/Medical only) Getting and Setting the Rotation Properties

 

Altering Annotation Object Settings

 

New Annotation Features of Version 14.5

 

Flipping, Reversing and Rotating Annotation Objects

Example

void GetrotateoptionsExample(LAnnRectangle annrect)
{
   // This example toggles whether the annotation object displays
   // rotate handles. If displaying rotate handles, the object
   // is changed so that it does not display rotate handles.
   // If not displaying rotate handles, the object is changed
   // so that it displays rotate handles
   L_INT nRet;
   L_CHAR szMsg[200];
   ANNROTATEOPTIONS RotateOptions;

   memset(&RotateOptions, 0, sizeof(ANNROTATEOPTIONS));

   RotateOptions.uStructSize = sizeof(ANNROTATEOPTIONS);
   RotateOptions.uFlags = ANNROTATE_SHOW_ROTATE_HANDLES;
   RotateOptions.nReserved = 0;

   nRet = annrect.GetRotateOptions(&RotateOptions, sizeof(ANNROTATEOPTIONS));
   if (nRet != SUCCESS)
      return ;

   wsprintf(szMsg, TEXT("Old State: bShowRotateHandles: %s"), RotateOptions.bShowRotateHandles ? TEXT("TRUE") : TEXT("FALSE"));
   MessageBox(NULL, szMsg, "", MB_OK);

   // Change the state
   RotateOptions.bShowRotateHandles = !RotateOptions.bShowRotateHandles;
   nRet = annrect.SetRotateOptions(&RotateOptions, 0);
   if (nRet != SUCCESS)
      return ;

   nRet = annrect.GetRotateOptions(&RotateOptions, sizeof(ANNROTATEOPTIONS));
   if (nRet != SUCCESS)
      return ;

   wsprintf(szMsg, TEXT("New State: bShowRotateHandles: %s"), RotateOptions.bShowRotateHandles ? TEXT("TRUE") : TEXT("FALSE"));
   MessageBox(NULL, szMsg, "", MB_OK);
}