L_VecGetScale

Summary

Gets the current scale values.

Syntax

#include "ltvkrn.h"

L_LVKRN_API L_INT L_VecGetScale(pVector, pScale)

Parameters

const pVECTORHANDLE pVector

Pointer to a vector handle.

pVECTORPOINT pScale

Pointer to a VECTORPOINT structure to be updated with the current scale values.

Returns

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

Comments

The scale values retrieved are those set using L_VecSetScale, with pObject set to NULL and dwFlags set to 0L.

A scale value of 1.0 represents a scale factor of 100%; a scale value of 0.5 represents a scale factor of 50%; a scale value of 2.0 represents a scale factor of 200%, etc.

The default scale values are 1.0, 1.0, and 1.0 for the X, Y, and Z axes.

Required DLLs and Libraries

See Also

Functions

Example

This example will show the current scale values, in percentage, in a message box.

L_INT VecGetScaleExample( pVECTORHANDLE pVector ) 
{ 
   L_INT nRet; 
   VECTORPOINT scale;            /* Scale values */ 
   L_TCHAR     szBuffer[ 80 ];   /* Buffer */ 
 
   /* Get current scale values */ 
   nRet = L_VecGetScale( pVector, &scale ); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /* Format in a buffer */ 
   wsprintf( szBuffer, TEXT("%d%%, %d%%, %d%%"), 
             (L_INT) ( scale.x * 100.0 ), 
             (L_INT) ( scale.y * 100.0 ), 
             (L_INT) ( scale.z * 100.0 ) ); 
 
   /* Show a message box */ 
   MessageBox( NULL, szBuffer, TEXT("Scale factors"), 0 ); 
 
   return SUCCESS; 
} 

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Vector C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.