L_AnnGetRotateAngle

#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnGetRotateAngle(hObject, *pdAngle)

HANNOBJECT hObject;

/* handle to the annotation object */

L_DOUBLE *pdAngle;

/* pointer to a double that returns the rotate angle */

Gets the rotation angle for an annotation object.

This function is available in the Document and Medical Imaging toolkits.

Parameter

Description

hObject

Handle to the annotation object.

pdAngle

Pointer to a double variable to be updated with the rotation angle.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Call this function to get the rotation angle for a particular annotation object.

The angle is in radians, and uses the following convention.

The possible range of rotate values is (-Pi) ... (Pi)

A rotation in the clockwise direction is considered a positive rotation.

A rotation in the counter-clockwise direction is considered a negative rotation.

For example, if a rectangle is rotated 90 degrees in the counter clockwise direction, this function will get (-PI/2) for the rotation angle. If a rectangle is rotated 90 degrees in the clockwise direction, this function will get PI/2 for the rotation angle. If a rectangle is rotated 270 degrees in the counter clockwise direction, this is equivalent to 90 degrees in the clockwise direction so the rotation value returned is PI/2.

This function is only valid for the following annotation object types:

ANNOBJECT_POINTER:

ANNOBJECT_LINE:

ANNOBJECT_RULER:

ANNOBJECT_AUDIO:

ANNOBJECT_BUTTON:

ANNOBJECT_ELLIPSE:

ANNOBJECT_HILITE:

ANNOBJECT_HOTSPOT:

ANNOBJECT_NOTE:

ANNOBJECT_RECT:

ANNOBJECT_REDACT:

ANNOBJECT_STAMP:

ANNOBJECT_TEXT:

ANNOBJECT_VIDEO:

ANNOBJECT_PUSHPIN:

ANNOBJECT_ENCRYPT:

If the function is used with an object that is not listed, it returns SUCCESS with *pdAngle equal to 0.

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 2000 / XP/Vista.

See Also

Functions:

L_AnnDefine, L_AnnAddUserHandle, L_AnnAdjustPoint, L_AnnChangeUserHandle, L_AnnConvert, L_AnnDefine2, L_AnnDeleteUserHandle, L_AnnEnumerateHandles, L_AnnGetRestrictToContainer, L_AnnGetUserHandle, L_AnnGetUserHandles, L_AnnHitTest, L_AnnRestrictCursor, L_AnnSetRestrictToContainer, L_AnnCalibrateRuler, L_AnnCalibrateRulerSuccessive

Topics:

Annotation Functions: Creating and Deleting Annotations

 

Implementing Custom Annotations

 

Implementing Annotations

 

Implementing an Automated Annotation Program

 

Implementing a Non-automated Annotation Program

 

Obtaining Annotation Object Information

Example

This examples displays the rotate angle of the annotation hObject in radians and degrees.

 L_INT AnnGetRotateAngleExample(HANNOBJECT hObject)
{
   L_INT nRet;
   L_DOUBLE    dAngle;
   L_TCHAR     szMsg[200];

   nRet = L_AnnGetRotateAngle(hObject, &dAngle);
   if (nRet == SUCCESS)
   {
      _stprintf_s(szMsg, TEXT("Angle of rotation:  Radians[%lf]  Degrees[%f]\n"),
         dAngle,
         dAngle *180 / 3.1415926535
         );
      MessageBox(NULL, szMsg, TEXT(""), MB_OK);
   }
   else
     return nRet;
   return SUCCESS;
}