L_AnnGetAngle

#include "l_bitmap.h"

L_INT EXT_FUNCTION L_AnnGetAngle(hObject, pdAngle)

HANNOBJECT hObject;

/* handle to the annotation object */

L_DOUBLE, L_FAR * 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. This function is available in the Document/Medical Toolkits.

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.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function is only valid for Protractor annotation objects (ANNOBJECT_PROTRACTOR).

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.

Platforms

Windows 95 / 98 / Me, Windows 2000 / XP.

See Also

Functions:

L_AnnSetProtractorOptions,

 

L_AnnGetProtractorOptions

Topics:

Annotation Functions: Object Properties

 

Implementing Annotations

 

Automated User Interface for Annotations

 

Implementing an Automated Annotation Program

 

Obtaining Annotation Object Information

Example

void TestFunction2(void)
{
   HANNOBJECT hContainer; /* Container annotation object */

   ANNENUMCALLBACK annAngleCallback;
   L_AnnEnumerate(hContainer, annAngleCallback, NULL, ANNFLAG_RECURSE|ANNFLAG_NOTCONTAINER, NULL);
}
L_INT EXT_CALLBACK annAngleCallback(HANNOBJECT hObject, L_INT L_FAR *pUserData)
{
L_INT nRet;
L_DOUBLE dAngle;
L_UINT Type;
L_TCHAR Abbrev[80];
L_TCHAR cs[256];

nRet = L_AnnGetType(hObject, &Type);
if (nRet == SUCCESS)
{
 switch (Type)
 {
 case ANNOBJECT_PROTRACTOR:
  L_AnnGetAngle(hObject, &dAngle);
  L_AnnGetProtractorOptions(hObject, NULL, NULL, NULL, Abbrev, NULL, NULL);
  wsprintf(cs, TEXT("The angle is %f %s.\n"), dAngle, Abbrev);
  MessageBox(NULL, cs, TEXT("Results"), MB_OK);
  break;
 default:
  MessageBox(NULL, TEXT("This object is not a protractor."), TEXT(""), MB_OK);
 }
}

return SUCCESS;
}