LVectorObject::SetScale

#include "ltwrappr.h"

virtual L_INT LVectorObject::SetScale(pScale, pOrigin)

const pVECTORPOINT pScale;

/* pointer to a vector point */

const pVECTORPOINT pOrigin;

/* pointer to a vector point */

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

Parameter

Description

pScale

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

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

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

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorObject::SetRotation, LVectorObject::SetTranslation

Topics:

Rotating, Translating, Scaling Vector Images

 

Vector Images: Modifying Vector Object Characteristics

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;
}