L_VecApplyTransformation
#include "lvkrn.h"
L_INT EXT_FUNCTION L_VecApplyTransformation( pVector)
pVECTORHANDLE pVector; |
/* pointer to a vector handle */ |
Applies the current transformation to the vector image. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.
Parameter |
Description |
pVector |
Pointer to a vector handle referencing an image drawing. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
This function will apply the current transformation (Rotation, scaling and translation) to the vector image. The vector image objects will be changed.
After a call to this function, rotation, scaling and translation values will be reset.
Not supported in DirectX or OpenGL engines.
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: |
Example
/* This example loads a vector drawing, applies some transformation then saves it back */
void DoMyTransformation( L_TCHAR *pszFile )
{
VECTORHANDLE TmpVector; /* Vector handle for initial loading */
VECTORPOINT point;
/* Load the drawing */
L_VecLoadFile( pszFile, &TmpVector, NULL, NULL );
/* Rotate 30 degrees along the 3 axes */
point.x = 30.0;
point.y = 30.0;
point.z = 30.0;
L_VecSetRotation( &TmpVector, &point, NULL, NULL, 0L );
/* Scale to 200% */
point.x = 2.0;
point.y = 2.0;
point.z = 2.0;
L_VecSetScale( &TmpVector, &point, NULL, NULL, 0L );
/* Translate 5 units along each axis */
point.x = 5.0;
point.y = 5.0;
point.z = 5.0;
L_VecSetTranslation( &TmpVector, &point, NULL, 0L );
/* Apply the transformation to the image */
L_VecApplyTransformation( &TmpVector );
/* Saves it back */
L_VecSaveFile( pszFile, &TmpVector, FILE_DXF, NULL );
/* Free the vector */
L_VecFree( &TmpVector );
}