Converts an enhanced Windows metafile (EMF) into a LEAD Technologies vector handle. When this function is completed, there are two copies of the drawing in memory: the EMF and the original LEAD vector. Freeing one will not affect the other.
This function is available in the LEADTOOLS Vector Imaging Toolkit.
#include "ltwrappr.h"
virtual L_INT LVectorBase::ConvertFromEMF(hdc, hEMF)
Handle to the device context responsible for the conversion.
Handle to the EMF to be converted.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function updates information in the vector handle and copies the EMF drawing data into the LEAD bitmap.
L_INT LVectorBase__ConvertFromEMFExample( HWND hWnd, L_TCHAR* pszFileName, HENHMETAFILE hEMF )
{
L_INT nRet;
LVectorBase Vector;
HDC hDC;
//Convert to LEAD vector
hDC = GetDC( hWnd );
nRet = Vector.ConvertFromEMF( hDC, hEMF );
if(nRet != SUCCESS)
return nRet;
ReleaseDC( hWnd, hDC );
//Save as DXF
nRet = Vector.Save( pszFileName,FILE_DXF);
if(nRet != SUCCESS)
return nRet;
return SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document