Hides or shows an object.
#include "ltvkrn.h"
L_LVKRN_API L_INT L_VecHideObject(pVector, pObject, bHide)
Pointer to a vector handle. Objects within this vector handle will be hidden or shown.
Pointer to a VECTOROBJECT structure that references an object to be hidden or shown.
Flag that indicates whether to hide or show the specified object. Possible values are:
Value | Meaning |
---|---|
TRUE | Hide the specified object. |
FALSE | Show the specified object. |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Hides or shows an object within the specified vector handle.
A hidden object will not be drawn. It will also not be returned when calling the L_VecHitTest function.
Please note that you will have to update the window to see the results of this function.
This example will hide the object under a given 2D point.
L_LTVKRNTEX_API L_INT VecHideObjectExample(
pVECTORHANDLE pVector,
POINT* pPoint)
{
VECTOROBJECT Object; /* Object under point */
L_INT nRet;
/* Get object under that point */
nRet = L_VecHitTest( pVector, pPoint, &Object );
/* Is there an object under that point? */
if( nRet == SUCCESS )
/* Yes, hide it */
nRet = L_VecHideObject( pVector, &Object, TRUE );
return nRet;
}