L_AnnGetTextRotate

#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnGetTextRotate(hObject, puTextRotate)

Gets a value that indicates whether the text of an annotation object is rotated.

Parameters

HANNOBJECT hObject

Handle to the annotation object.

L_UINT *puTextRotate

Address of the variable to be updated with a value that indicates whether the text is rotated, and if so, by how many degrees. Possible values are:

Value Meaning
TEXTROTATE_0 [0] Do not rotate the text.
TEXTROTATE_90 [90] The text is rotated 90 degrees counter clockwise.
TEXTROTATE_180 [180] The text is rotated 180 degrees counter clockwise.
TEXTROTATE_270 [270] The text is rotated 270 degrees counter clockwise.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This function is valid only for the following annotation objects:

Calling this function on an object other than those listed above will return ERROR_FEATURE_NOT_SUPPORTED.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

Sample for L_AnnSetTextRotate, L_AnnGetTextRotate. This Example changes the text rotation of a note or text pointer annotation.

L_INT AnnGetTextRotateExample(HANNOBJECT hObject) 
{ 
   L_INT    nRet; 
   L_UINT   uTextRotate; 
   L_TCHAR  szMsg[100]; 
   L_UINT   uType; 
 
   L_AnnGetTextRotate(hObject, &uTextRotate); 
   switch(uTextRotate) 
   { 
   case TEXTROTATE_0: 
      uTextRotate = TEXTROTATE_90; 
      break; 
 
   case TEXTROTATE_90: 
      uTextRotate = TEXTROTATE_180; 
      break; 
 
   case TEXTROTATE_180: 
      uTextRotate = TEXTROTATE_270; 
      break; 
 
   case TEXTROTATE_270: 
      uTextRotate = TEXTROTATE_0; 
      break; 
 
   } 
   nRet= L_AnnSetTextRotate(hObject, uTextRotate, 0); 
   if (nRet != SUCCESS) 
   { 
      L_AnnGetType(hObject, &uType); 
      wsprintf(szMsg, TEXT("L_AnnSetTextRotate Error: %d on object type[%d]\n"), nRet, uType); 
      MessageBox(NULL, szMsg, TEXT("Error"), MB_OK); 
      return nRet; 
   } 
   return SUCCESS; 
} 

Help Version 20.0.2019.12.5
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2019 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help