L_VecExplodeObject

#include "ltvkrn.h"

L_LVKRN_API L_INT L_VecExplodeObject(pVector, pObject, dwFlags)

Explodes a vector object or objects to smaller parts. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameters

pVECTORHANDLE pVector

Pointer to a vector handle.

const pVECTOROBJECT pObject

Pointer to a vector object.

L_UINT32 dwFlags

Flag that indicates which object(s) to explode. Possible values are:

Value Meaning
0 Explode all objects
VECTOR_FLAGS_SELECTED_ONLY Explode only selected objects.
VECTOR_FLAGS_EXPLODE_TO_LINES Explode object into lines.

Returns

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

Comments

If pObject is NULL and dwFlags is set to VECTOR_FLAGS_SELECTED_ONLY, this function will explode only selected objects within the vector handle.

If pObject is NULL and dwFlags is set to 0, this function will explode all objects within the vector handle.

If pObject is not NULL, only the specified object is exploded and dwFlags is ignored.

If the VECTOR_FLAGS_EXPLODE_TO_LINES flag is not specified, then not all objects can be exploded. For example an attempt to explode a VECTOR_LINE has no effect and returns SUCCESS.

Below is a list of object types and the objects into which they explode:

Object type After L_VecExplodeObject
VECTOR_ARC Same.
VECTOR_CHORD Same.
VECTOR_CIRCLE Same.
VECTOR_CLONE The objects inside the group will be added to the vector handle.
VECTOR_ELLIPSE Same.
VECTOR_ELLIPTICALARC Same.
VECTOR_LINE Same.
VECTOR_PIE Same.
VECTOR_POLYBEZIER ( (nPointCount + 2) / 3 ) - 1 VECTOR_POLYBEZIERs.
VECTOR_POLYDRAW VECTOR_LINEs and VECTOR_POLYBEZIERs.
VECTOR_POLYGON nPointCount + 1 VECTOR_LINEs
VECTOR_POLYLINE nPointCount of VECTOR_LINE's.
VECTOR_RASTER Same.
VECTOR_RECTANGLE 4 VECTOR_LINE's.
VECTOR_TEXT Same.
VECTOR_VERTEX Same.

Required DLLs and Libraries

See Also

Topics

Example

This example will explode all selected objects inside a vector handle.

L_LTVKRNTEX_API L_INT VecExplodeObjectExample(pVECTORHANDLE pVector) 
{ 
   L_INT nRet; 
   
   nRet = L_VecExplodeObject( pVector, NULL, VECTOR_FLAGS_SELECTED_ONLY ); 
    
   return nRet; 
} 

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

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