Article View: comp.os.ms-windows.programmer.graphics
Article #19How to get metric coordinates out of ENHMETARECORD
From: Bertrand Lenoir-Welter
Date: Fri, 25 Jun 1999 00:00
Date: Fri, 25 Jun 1999 00:00
42 lines
2485 bytes
2485 bytes
Hi all
I'm trying to integrate EMF import in a vector graphics program
that handles its own geometric system (not just paints in a DC),
so need to extract coordinates out of ENHMETARECORD. I'm able to
read these coordinates directly from the record as long as it's
EMR_MOVETOEX or EMR_LINETO types, but cannot find how to get for
example a EMRPOLYLINE or EMRPOLYLINE18 or other structures from
the record.
My code looks like this:
int CALLBACK EnhMetaFileProc(HDC, HANDLETABLE FAR*,
ENHMETARECORD FAR *lpEMFR,
int, LPARAM) {
switch(lpEMFR->iType) {
case EMR_MOVETOEX:
// this one's ok, coords are picked up from lpEMFR->dParm[]
break;
case EMR_LINETO:
// this one's ok too.
break;
case EMR_POLYLINE:
// How can I get coordinates then? lpEMFR->nSize gives a
// variable size, but lpEMFR->dParm[] are not coordinates.
// How can I access EMRPOLYLINE structure from here?
break;
case EMR_POLYLINE16:
case EMR_POLYGON:
// etc. Same question...
break;
}
}
Note that I have no use of any DC since I just want to load
vector info and convert it to my own data format.
Thanks for any help.
--
Remove the "stuff" from my address for direct mail
Technical Details
Message-ID:
<3773AAFD.EAE@galaad.stuff.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1162da,7e27479009e6262c,start X-Google-Attributes: gid1162da,public X-Google-Thread: 103bde,7e27479009e6262c,start X-Google-Attributes: gid103bde,public X-Google-Thread: 101278,7e27479009e6262c,start X-Google-Attributes: gid101278,public X-Google-Thread: 105df1,7e27479009e6262c,start X-Google-Attributes: gid105df1,public From: Bertrand Lenoir-Welter <info@galaad.stuff.net> Subject: How to get metric coordinates out of ENHMETARECORD Date: 1999/06/25 Message-ID: <3773AAFD.EAE@galaad.stuff.net> X-Deja-AN: 493817250 Cache-Post-Path: toffoli.webstore.fr!unknown@usr17-nice-pm31.webstore.fr Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@isdnet.net X-Trace: news4.isdnet.net 930327111 9956 62.4.8.227 (25 Jun 1999 16:11:51 GMT) Organization: Webstore News X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) Mime-Version: 1.0 NNTP-Posting-Date: 25 Jun 1999 16:11:51 GMT Newsgroups: comp.os.ms-windows.programmer.graphics,comp.os.ms-windows.programmer.misc,borland.public.cpp.winapi,microsoft.public.win32.programmer.gdi