L_AnnGetPointOptions

Summary

Gets the options for the specified point annotation object.

Syntax

#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnGetPointOptions(hObject, pPointOptions, uStructSize)

Parameters

HANNOBJECT hObject

Handle to the annotation object.

pANNPOINTOPTIONS pPointOptions

Pointer to an ANNPOINTOPTIONS structure to be updated with the various point appearance options for the specified annotation object.

L_UINT uStructSize

Size in bytes, of the structure pointed to by pPointOptions, for versioning. Use sizeof(ANNPOINTOPTIONS).

Returns

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

Comments

Use this function to get the point appearance options of an annotation point object. To use this function, declare a variable of type ANNPOINTOPTIONS, and pass the address of this variable as the second argument. For more information, see the documentation for the structure ANNPOINTOPTIONS.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

This example toggles the appearance of a point annotation object.
The appearance toggles between a bitmap an a circle.

L_INT AnnGetPointOptionsExample(HANNOBJECT hObject) 
{ 
   L_INT             nRet; 
   ANNPOINTOPTIONS   PointOptions; 
   L_UINT            uObjectType; 
 
   nRet = L_AnnGetType(hObject, &uObjectType); 
   if (nRet != SUCCESS) 
      return nRet; 
 
   if (uObjectType != ANNOBJECT_POINT) 
   { 
      _tprintf(_T("%s"), TEXT("Error: This object is not a point object.")); 
      return FAILURE; 
   } 
 
   memset(&PointOptions, 0, sizeof(ANNPOINTOPTIONS)); 
   PointOptions.uStructSize = sizeof(ANNPOINTOPTIONS); 
   PointOptions.uFlags = ANNPOINT_ALL; 
 
   nRet = L_AnnGetPointOptions(hObject, &PointOptions, sizeof(ANNPOINTOPTIONS)); 
   if (nRet != SUCCESS) 
      return nRet; 
 
   if (PointOptions.bPointUseBitmap) 
   { 
      // Change point appearance to a circle 
      PointOptions.uStructSize = sizeof(ANNPOINTOPTIONS); 
      PointOptions.bPointUseBitmap = L_FALSE; 
      PointOptions.bPointFixedSize = L_FALSE; 
      PointOptions.bPointTransparentFill = L_FALSE; 
      PointOptions.crPointBorderColor = RGB(0, 0, 0); 
      PointOptions.crPointFillColor = RGB(255, 255, 0); 
      PointOptions.nPointRadius = 12; 
      PointOptions.nReserved = 0; 
      PointOptions.uFlags = ANNPOINT_USE_BITMAP | 
         ANNPOINT_RADIUS | 
         ANNPOINT_BORDER_COLOR | 
         ANNPOINT_FILL_COLOR | 
         ANNPOINT_TRANSPARENT_FILL | 
         ANNPOINT_FIXED_SIZE; 
   } 
   else 
   { 
      // Change point appearance to a bitmap 
      PointOptions.uStructSize = sizeof(ANNPOINTOPTIONS); 
      PointOptions.bPointUseBitmap = L_TRUE; 
      PointOptions.bPointBitmapTransparent = L_TRUE; 
      PointOptions.crPointBitmapTransparentColor = RGB(255, 255, 255); 
      PointOptions.nReserved = 0; 
   } 
 
   return L_AnnSetPointOptions(hObject, &PointOptions, 0); 
} 

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

LEADTOOLS Raster Imaging C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.