#include "lvkrn.h"
L_LVKRN_API L_INT L_VecGetObjectViewContext(pVector, pObject, pMin, pMax)
Retrieves the minimum and maximum points of an objects view context space.
Pointer to vector handle.
Pointer to a VECTOROBJECT structure that contains the vector object for which to get the view context.
Pointer to a VECTORPOINT structure to be updated with the minimum point of the view context space.
Pointer to a VECTORPOINT structure to be updated with the maximum point of the view context space.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function fails if pObject does not have a preset view context.
Required DLLs and Libraries
L_INT VecGetObjectViewContextExample(
pVECTORHANDLE pVector,
pVECTOROBJECT pObject,
pVECTORPOINT pMin,
pVECTORPOINT pMax)
{
L_INT nRet;
VECTORPOINT Min;
VECTORPOINT Max;
nRet = L_VecGetObjectViewContext ( pVector, pObject, &Min, &Max );
if( SUCCESS != nRet )
{
nRet = L_VecSetObjectViewContext ( pVector, pObject, pMin, pMax );
if (nRet != SUCCESS)
return nRet;
*pMin = Min;
*pMax = Max;
}
if( SUCCESS != nRet )
L_VecRemoveObjectViewContext ( pVector, pObject );
return nRet;
}