LContainer::GetScalar

#include "Ltwrappr.h"

L_INT LContainer::GetScalar (pvptScalarNum, pvptScalarDen)

Gets the current container coordinates scaling values.

Parameters

pVECTORPOINT pvptScalarNum

Pointer to VECTORPOINT structure to be updated with the numerator of the scaling factors for the x, y and z directions.

pVECTORPOINT pvptScalarDen

Pointer to VECTORPOINT structure to be updated with the denominator of the scaling factors for the x, y and z directions.

Returns

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

Required DLLs and Libraries

See Also

Functions

Topics

Example

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 ; 
 
} 
Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Container and Automation C++ Class Library Help