L_LVKRN_API L_INT L_VecGetObjectParallelogram(pVector, pObject, pMin, pMax, dwFlags)
Gets the parallelogram that contains the specified object(s).
Pointer to a vector handle.
Pointer to a VECTOROBJECT structure that references an object. If this parameter is not NULL, the top left point of this objects bounding parallelogram will be copied into pLeftTop and the bottom right point of the parallelogram will be copied into pRightBottom.
If this parameter is NULL, dwFlags will control which objects parallelogram to copy into pLeftTop and pRightBottom.
Pointer to a VECTORPOINT structure to be updated with the minimum point of the bounding parallelogram of the specified object.
Pointer to a VECTORPOINT structure to be updated with the maximum point of the bounding parallelogram of the specified object.
Flag that indicates which parallelogram to use when updating the pLeftTop and pRightBottom parameters. This flag is valid only if pObject is NULL. If pObject is not NULL, this parameter is ignored. Possible values are:
Value | Meaning |
---|---|
0 | pMin and pMax will be updated with the parallelogram containing all objects within the vector handle. |
VECTOR_FLAGS_SELECTED_ONLY | pMin and pMax will be updated with the parallelogram containing all selected objects within the vector handle. |
VECTOR_FLAGS_TRANSFORMED | Apply transformation settings on pMin and pMax to be updated with the parallelogram. |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Obtains the bounding parallelogram of a single object, several selected objects, or all objects within the specified vector handle.
Required DLLs and Libraries
This example will show the logical extent of the drawing, in a message box.
L_LTVKRNTEX_API L_INT VecGetObjectParallelogramExample(pVECTORHANDLE pVector)
{
L_INT nRet;
VECTORPOINT Min; /* Left-top point */
VECTORPOINT Max; /* Right-bottom point */
L_TCHAR szBuffer[ 80 ]; /* Buffer */
/* Get the parallelogram of all objects */
nRet = L_VecGetObjectParallelogram( pVector, NULL, &Min, &Max, 0L );
if(nRet != SUCCESS)
return nRet;
/* Format into a buffer */
_stprintf_s( szBuffer,80, TEXT("%.3f, %.3f, %.3f - %.3f, %.3f, %.3f"),
Min.x, Min.y, Min.z,
Max.x, Max.y, Max.z );
/* Show in a message box */
MessageBox( NULL, szBuffer, TEXT("Drawing extent"), 0 );
return SUCCESS;
}