#include "ltwrappr.h"
L_INT LVectorObject::SetScale(pScale, pOrigin)
Scales the class object. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.
Pointer to a VECTORPOINT structure that contains the scale values for each axis. The translation values are in logical units.
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.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
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
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;
}