L_INT LAnnotation::GetRotateOptions(pRotateOptions, uStructSize)
Gets the rotation options for the specified annotation object.
Pointer to an ANNROTATEOPTIONS structure that specifies the rotate options to be set.
Size in bytes, of the structure pointed to by pRotateOptions, for versioning. Use sizeof(ANNROTATEOPTIONS).
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Use this function to get the rotation options of any annotation object, including the automation object. To use this function, declare a variable of type ANNROTATEOPTIONS, and pass the address of this variable as the second argument. For more information, refer to the documentation for the structure ANNROTATEOPTIONS.
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);
}
Win32, x64.
L_INT LAnnotation_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_TCHAR 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 nRet;
wsprintf(szMsg, TEXT("Old State: bShowRotateHandles: %s"), RotateOptions.bShowRotateHandles ? TEXT("TRUE") :
TEXT("FALSE"));
MessageBox(NULL, szMsg, TEXT(""), MB_OK);
// Change the state
RotateOptions.bShowRotateHandles = !RotateOptions.bShowRotateHandles;
nRet = annrect.SetRotateOptions(&RotateOptions, 0);
if (nRet != SUCCESS)
return nRet;
nRet = annrect.GetRotateOptions(&RotateOptions, sizeof(ANNROTATEOPTIONS));
if (nRet != SUCCESS)
return nRet;
wsprintf(szMsg, TEXT("New State: bShowRotateHandles: %s"),
RotateOptions.bShowRotateHandles ? TEXT("TRUE") :
TEXT("FALSE"));
MessageBox(NULL, szMsg, TEXT(""), MB_OK);
return SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document