Actify

AutoGraph International

Enigma

Geomodeling Tech. Corp.

GeoPLUS

Halliburton

Hewlett-Packard (HP)

Logistics Business Systems

Lexco Data Systems

Lexmark International

Fugro-Jason

Production Geoscience Ltd.

PTC/Arbortext

Seismic Micro-Technology

Schlumberger

Star AG

Plus many more...

sales@cgmlarson.com
Request Evaluation
Phone: (+1) 713-977-4177

Windows EMF to CGM SDK

Quickly implement a high quality ISO CGM file output from Windows Applications.

The task of writing CGM from a Windows application is not a trivial, considering the time required to learn the CGM format. Our EMF to CGM SDK makes this task simple.

To get started, you need a target application to capture your application's drawing command (GDI objects) to an Enhanced Windows Metafile, then our EMF to CGM Converter will efficiently convert Windows GDI objects such as arc, polygon, polyline, textout, polybezier and stretchblt directly to their CGM equivalents.

Example Code (C++):

 

#include "emf2cgm"

CMetaFileDC aEmfDC;
HENHMETAFILE hEmf;

CClientDC aRefDC(this);
if ( !(aEmfDC.CreateEnhanced(&aRefDC, "sample.emf", NULL, NULL)) )
return; // Unable to Create Temporary Emf File

aEmfDC.m_hAttribDC = aRefDC.GetSafeHdc();
CRect rect;
GetClientRect(&rect);
OnDraw(&aEmfDC, &rect, &rect);

if ( !(hEmf = aEmfDC.CloseEnhanced()) )
return; // error writing EMF

DeleteEnhMetaFile(hEmf);

if (Emf2Cgm("sample.emf","sample.cgm", TRUE, FALSE, PIP, FALSE))
return; // error converting to CGM

EMF to CGM Converter is available as a DLL or static library compatible with MS Visual C++, Borland C++, Visual Basic and other development environments.

Return to SDK Overview