LVectorBase::EnumVertices

#include "ltwrappr.h"

virtual L_INT LVectorBase::EnumVertices(dwFlags=0)

L_UINT32 dwFlags;

flags that determine which object's flags to enumerate

Enumerates all vertices within the vector handle.

Parameter Description
dwFlags Flags that determine which object's vertices to enumerate. Possible values are:
  Value Meaning
  0 Enumerate the vertices of all objects.
  VECTOR_FLAGS_SELECTED_ONLY Enumerate the vertices of selected objects only.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function will enumerate all the vertices in the given vector.

Note: In DirectX, you cannot enumerate vertices, therefore this function will do nothing.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorBase::EnumObjects

Topics:

Manipulating Objects or Vertices within a Vector Image

 

Vector Images: Obtaining Object Information

Example

#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName 
class LMyVectorBase2EV: public LVectorBase 
{ 
public: 
   L_INT          m_nObjectCount ; 
public: 
   LMyVectorBase2EV(); 
   virtual ~LMyVectorBase2EV() ; 
   virtual L_INT EnumVerticesCallBack(pVECTORHANDLE pVector, pVECTORPOINT pPoint); 
}; 
LMyVectorBase2EV::LMyVectorBase2EV() 
{ 
   m_nObjectCount = 0 ; 
} 
LMyVectorBase2EV::~LMyVectorBase2EV() 
{ 
} 
L_INT LMyVectorBase2EV::EnumVerticesCallBack(pVECTORHANDLE pVector, pVECTORPOINT pPoint) 
{ 
   UNREFERENCED_PARAMETER(pVector); 
   UNREFERENCED_PARAMETER(pPoint); 
   m_nObjectCount++ ; 
   return SUCCESS ; 
} 
L_INT LVectorBase__EnumVerticesExample(HWND hWnd) 
{ 
   L_INT             nRet; 
   L_TCHAR           szTemp[100]; 
   LMyVectorBase2EV  Vector; 
   nRet = Vector.Load(MAKE_IMAGE_PATH(TEXT("random.dxf"))); 
   if(nRet != SUCCESS) 
      return nRet; 
   //Get the total number of vertices 
   Vector.m_nObjectCount=0; 
   Vector.EnableCallBack (TRUE); 
   nRet = Vector.EnumVertices(); 
   if(nRet != SUCCESS) 
      return nRet; 
   wsprintf(szTemp, TEXT("Total Vertices in Vector: %d\n"), Vector.m_nObjectCount); 
   MessageBox(hWnd, szTemp, TEXT(""), MB_OK); 
   return SUCCESS; 
} 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Vector C++ Class Library Help