LVectorBase::ApplyTransformation
#include "ltwrappr.h"
virtual L_INT LVectorBase::ApplyTransformation(L_VOID)
Applies the current transformation to the vector image.
This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
This function will apply 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 engine.
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
Example
//This example opens an image, rotates it, and saves the result as a .dxf file
//The vector is saved as transformed
L_VOID Example55(HWND hWnd)
{
LVectorBase Vector;
RECT rect;
//Load the drawing
Vector.Load(TEXT("s:\\temp\\images\\dxf\\skull.dxf"));
//Attach to window
Vector.AttachToWindow(hWnd);
//Set viewport
GetClientRect(hWnd, &rect);
Vector.SetViewport(&rect);
//Rotate
VECTORPOINT rotatePoint;
Vector.GetRotation(&rotatePoint);
rotatePoint.x += 30.0F;
rotatePoint.y -= 100.0F;
rotatePoint.z += 50.0F;
Vector.SetRotation(&rotatePoint,NULL,NULL);
//Make transformations apply to save
Vector.ApplyTransformation();
//Save
Vector.SetFileName(TEXT("d:\\image.dxf"));
Vector.Save(FILE_DXF);
}