#include "Ltwrappr.h"
L_INT LContainer::GetScalar (pvptScalarNum, pvptScalarDen)
Gets the current container coordinates scaling values.
Pointer to VECTORPOINT structure to be updated with the numerator of the scaling factors for the x, y and z directions.
Pointer to VECTORPOINT structure to be updated with the denominator of the scaling factors for the x, y and z directions.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Required DLLs and Libraries
L_INT LContainer_GetScalarExample( LContainer &lCont )
{
L_INT nRet;
nRet = lCont.IsValid ();
if (SUCCESS == nRet ) /* check the validity of container handle */
{
VECTORPOINT vptScalarNum, vptScalarDen ;
/* get the current scaling values */
nRet = lCont.GetScalar ( &vptScalarNum, &vptScalarDen ) ;
if(nRet != SUCCESS)
return nRet;
/* Set the horizontal scaling factor */
vptScalarNum.x ++ ;
vptScalarDen.x = 1 ;
/* Set the vertical scaling factor */
vptScalarNum.y ++ ;
vptScalarDen.y = 1 ;
/* Set the z scaling factor to 1:1 factor */
vptScalarNum.z = 1 ;
vptScalarDen.z = 1 ;
nRet = lCont.SetScalar ( &vptScalarNum, &vptScalarDen ) ;
if(nRet != SUCCESS)
return nRet;
}
else
{
return nRet ;
}
return SUCCESS ;
}