LVectorObject::SetScale

#include "ltwrappr.h"

L_INT LVectorObject::SetScale(pScale, pOrigin)

Scales the class object. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameters

const pVECTORPOINT pScale

Pointer to a VECTORPOINT structure that contains the scale values for each axis. The translation values are in logical units.

const pVECTORPOINT pOrigin

Pointer to a VECTORPOINT structure that contains the scale center. If pObject is not NULL, scaling occurs around this point. If pOrigin is NULL, the scale center is the center of the class object.

Returns

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

Comments

Scales the class object based on the scale values in pScale.

pScale contains a scale value for each axis. 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.

Note for DirectX:, You cannot select objects or enumerate them.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example will scale a vector object under pPoint.

L_INT LVectorObject__SetScaleExample(HWND hWnd, LVectorBase *pVector, LPPOINT pPoint) 
{ 
   UNREFERENCED_PARAMETER(hWnd); 
 
   L_INT          nRet; 
   LVectorObject  VectorObject; 
 
   nRet = pVector->HitTest(pPoint, &VectorObject); 
   if (nRet==SUCCESS) 
   { 
      VECTORPOINT pointScale; 
      pointScale.x =  0.5; 
      pointScale.y =  0.5; 
      pointScale.z =  0.5; 
 
      nRet = VectorObject.SetScale(&pointScale); 
      if(nRet != SUCCESS) 
         return nRet; 
   } 
   else 
      return nRet; 
 
   return SUCCESS; 
} 

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

LEADTOOLS Vector C++ Class Library Help