LAnnProtractor::GetPoints

Summary

Fills the specified array of ANNPOINT structures with the endpoints of the ruler object.

Syntax

#include "ltwrappr.h"

virtual L_INT LAnnProtractor::GetPoints(pPoints)

Parameters

pANNPOINT pPoints

Pointer to the array to be filled with the vertices of the protractor object.

Returns

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

Comments

The ANNPOINT structure is like a Windows POINT structure, except that it uses double-precision floating point values.

Coordinates of an object's points are relative to its container object. The coordinates are interpreted using the container's scaling factors and offsets, which are described in Low-Level Coordinate System for Annotations.

The order of the vertices in the array is shown below:

image\ProPoint.gif

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

L_INT LAnnProtractor_GetPointsExample() 
{ 
   LBitmap MyBitmap; 
   LAnnProtractor MyAnnProtractor; 
 
   ANNPOINT MyPts[3] = { 40,40, 
                         140,40, 
                         140,140 
                       }; 
 
   pANNPOINT pMyPts = MyPts; 
   MyAnnProtractor.SetPoints(pMyPts, 3); 
 
   L_UINT uPointCount = MyAnnProtractor.GetPointCount(); 
   HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE, sizeof(ANNPOINT) * uPointCount); 
   pANNPOINT pAnnPoint = (pANNPOINT)GlobalLock(hGlobal); 
 
   MyAnnProtractor.GetPoints(pAnnPoint); 
 
   for (unsigned int i=0; i<uPointCount; i++) 
   { 
      L_TCHAR szTemp[100]; 
 
      wsprintf(szTemp, TEXT("[%d]Point(%d, %d)"), i, (int)pAnnPoint[i].x, (int)pAnnPoint[i].y); 
      AfxMessageBox(szTemp); 
   } 
 
   GlobalFree(hGlobal); 
 
   return SUCCESS; 
} 
Help Version 22.0.2023.2.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

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