#include "l_bitmap.h"
L_LTANN_API L_INT L_AnnGetAngle(hObject, pdAngle)
HANNOBJECT hObject; |
handle to the annotation object |
L_DOUBLE *pdAngle; |
address of a variable to be updated |
Gets the angle of the Protractor object in the object's unit of measurement, set by L_AnnSetProtractorOptions.
Parameter |
Description |
hObject |
Handle to the annotation object. |
pdAngle |
Address of a variable to be updated with the angle of the protractor object specified in hObject. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
This function is only valid for Protractor annotation objects (ANNOBJECT_PROTRACTOR).
Required DLLs and Libraries
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
Functions: |
|
|
|
Topics: |
|
|
|
|
|
|
|
|
L_INT EXT_CALLBACK annAngleCallback(HANNOBJECT hObject,
L_VOID* pUserData);
L_INT AnnGetAngleExample(HANNOBJECT hContainer//, /* Container annotation object */
/*ANNENUMCALLBACK annAngleCallback*/)
{
L_INT nRet;
nRet = L_AnnEnumerate(hContainer, annAngleCallback, NULL, ANNFLAG_RECURSE|ANNFLAG_NOTCONTAINER, NULL);
if(nRet != SUCCESS)
return nRet;
return SUCCESS;
}
L_INT EXT_CALLBACK annAngleCallback(HANNOBJECT hObject,
L_VOID* pUserData)
{
UNREFERENCED_PARAMETER(pUserData);
L_INT nRet;
L_DOUBLE dAngle;
L_UINT Type;
L_TCHAR cs[256];
L_SIZE_T uAbbrevLen = 0;
L_TCHAR *pszAbbrev = NULL;
nRet = L_AnnGetType(hObject, &Type);
if (nRet == SUCCESS)
{
switch (Type)
{
case ANNOBJECT_PROTRACTOR:
uAbbrevLen = 0;
pszAbbrev = NULL;
L_AnnGetAngle(hObject, &dAngle);
L_AnnGetProtractorOptions(hObject, NULL, NULL, &uAbbrevLen, NULL, NULL, NULL);
pszAbbrev = (L_TCHAR *)malloc( uAbbrevLen * (sizeof(L_TCHAR)+1));
L_AnnGetProtractorOptions(hObject, NULL, NULL, &uAbbrevLen, pszAbbrev, NULL, NULL);
_stprintf_s(cs, TEXT("The angle is %f %s.\n"), dAngle, pszAbbrev);
MessageBox(NULL, cs, TEXT("Results"), MB_OK);
free(pszAbbrev);
break;
default:
MessageBox(NULL, TEXT("This object is not a protractor."), TEXT(""), MB_OK);
}
}
return SUCCESS;
}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET