#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.


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


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.

Required DLLs and Libraries

See Also




This example opens an image, rotates it, and saves the result as a .dxf file.
The vector is saved as transformed.

L_INT LVectorBase__ApplyTransformationExample(HWND hWnd) 
   L_INT          nRet; 
   LVectorBase    Vector;  
   RECT           rect; 
   //Load the drawing  
   nRet = Vector.Load(MAKE_IMAGE_PATH(TEXT("random.dxf"))); 
   if(nRet != SUCCESS) 
      return nRet; 
   //Attach to window 
   nRet = Vector.AttachToWindow(hWnd); 
   if(nRet != SUCCESS) 
      return nRet; 
   //Set viewport 
   GetClientRect(hWnd, &rect); 
   nRet = Vector.SetViewport(&rect); 
   if(nRet != SUCCESS) 
      return nRet; 
   VECTORPOINT rotatePoint; 
   nRet = Vector.GetRotation(&rotatePoint); 
   if(nRet != SUCCESS) 
      return nRet; 
   rotatePoint.x += 30.0F; 
   rotatePoint.y -= 100.0F; 
   rotatePoint.z += 50.0F; 
   //Make transformations apply to save 
   nRet = Vector.ApplyTransformation(); 
   if(nRet != SUCCESS) 
      return nRet; 
   nRet = Vector.Save(FILE_DXF); 
   if(nRet != SUCCESS) 
      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