From 23d036719ddb42bd38b38cef211fe2a16b597edb Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Mon, 29 Mar 2004 23:04:11 +0000 Subject: [PATCH] Move EMR*16 definitions to wingdi.h, as they're part of the WIN32 API. --- include/wine/wingdi16.h | 29 ----------------------------- include/wingdi.h | 29 +++++++++++++++++++++++++++++ objects/enhmetafile.c | 25 ++++++++++++++++++++----- 3 files changed, 49 insertions(+), 34 deletions(-) diff --git a/include/wine/wingdi16.h b/include/wine/wingdi16.h index 701398ebffd..f2b4955a179 100644 --- a/include/wine/wingdi16.h +++ b/include/wine/wingdi16.h @@ -311,35 +311,6 @@ typedef struct HMETAFILE16 hMF; } METAFILEPICT16, *LPMETAFILEPICT16; -typedef struct { - EMR emr; - RECTL rclBounds; - DWORD cpts; - POINT16 apts[1]; -} EMRPOLYLINE16, *PEMRPOLYLINE16, - EMRPOLYBEZIER16, *PEMRPOLYBEZIER16, - EMRPOLYGON16, *PEMRPOLYGON16, - EMRPOLYBEZIERTO16, *PEMRPOLYBEZIERTO16, - EMRPOLYLINETO16, *PEMRPOLYLINETO16; - -typedef struct { - EMR emr; - RECTL rclBounds; - DWORD cpts; - POINT16 apts[1]; - BYTE abTypes[1]; -} EMRPOLYDRAW16, *PEMRPOLYDRAW16; - -typedef struct { - EMR emr; - RECTL rclBounds; - DWORD nPolys; - DWORD cpts; - DWORD aPolyCounts[1]; - POINT16 apts[1]; -} EMRPOLYPOLYLINE16, *PEMRPOLYPOLYLINE16, - EMRPOLYPOLYGON16, *PEMRPOLYPOLYGON16; - typedef INT16 (CALLBACK *MFENUMPROC16)(HDC16,HANDLETABLE16*,METARECORD*, INT16,LPARAM); typedef struct diff --git a/include/wingdi.h b/include/wingdi.h index b9858a041a6..d9c8570ec14 100644 --- a/include/wingdi.h +++ b/include/wingdi.h @@ -2335,6 +2335,35 @@ typedef struct { typedef struct { EMR emr; RECTL rclBounds; + DWORD cpts; + POINTS apts[1]; +} EMRPOLYLINE16, *PEMRPOLYLINE16, + EMRPOLYBEZIER16, *PEMRPOLYBEZIER16, + EMRPOLYGON16, *PEMRPOLYGON16, + EMRPOLYBEZIERTO16, *PEMRPOLYBEZIERTO16, + EMRPOLYLINETO16, *PEMRPOLYLINETO16; + +typedef struct { + EMR emr; + RECTL rclBounds; + DWORD cpts; + POINTS apts[1]; + BYTE abTypes[1]; +} EMRPOLYDRAW16, *PEMRPOLYDRAW16; + +typedef struct { + EMR emr; + RECTL rclBounds; + DWORD nPolys; + DWORD cpts; + DWORD aPolyCounts[1]; + POINTS apts[1]; +} EMRPOLYPOLYLINE16, *PEMRPOLYPOLYLINE16, + EMRPOLYPOLYGON16, *PEMRPOLYPOLYGON16; + +typedef struct { + EMR emr; + RECTL rclBounds; DWORD cptl; POINTL aptl[1]; BYTE abTypes[1]; diff --git a/objects/enhmetafile.c b/objects/enhmetafile.c index 2605e0fb085..92469dad710 100644 --- a/objects/enhmetafile.c +++ b/objects/enhmetafile.c @@ -869,7 +869,10 @@ BOOL WINAPI PlayEnhMetaFileRecord( pPoly->cpts * sizeof(POINT) ); DWORD i; for(i = 0; i < pPoly->cpts; i++) - CONV_POINT16TO32(pPoly->apts + i, pts + i); + { + pts[i].x = pPoly->apts[i].x; + pts[i].y = pPoly->apts[i].y; + } Polygon(hdc, pts, pPoly->cpts); HeapFree( GetProcessHeap(), 0, pts ); break; @@ -882,7 +885,10 @@ BOOL WINAPI PlayEnhMetaFileRecord( pPoly->cpts * sizeof(POINT) ); DWORD i; for(i = 0; i < pPoly->cpts; i++) - CONV_POINT16TO32(pPoly->apts + i, pts + i); + { + pts[i].x = pPoly->apts[i].x; + pts[i].y = pPoly->apts[i].y; + } Polyline(hdc, pts, pPoly->cpts); HeapFree( GetProcessHeap(), 0, pts ); break; @@ -895,7 +901,10 @@ BOOL WINAPI PlayEnhMetaFileRecord( pPoly->cpts * sizeof(POINT) ); DWORD i; for(i = 0; i < pPoly->cpts; i++) - CONV_POINT16TO32(pPoly->apts + i, pts + i); + { + pts[i].x = pPoly->apts[i].x; + pts[i].y = pPoly->apts[i].y; + } PolylineTo(hdc, pts, pPoly->cpts); HeapFree( GetProcessHeap(), 0, pts ); break; @@ -908,7 +917,10 @@ BOOL WINAPI PlayEnhMetaFileRecord( pPoly->cpts * sizeof(POINT) ); DWORD i; for(i = 0; i < pPoly->cpts; i++) - CONV_POINT16TO32(pPoly->apts + i, pts + i); + { + pts[i].x = pPoly->apts[i].x; + pts[i].y = pPoly->apts[i].y; + } PolyBezier(hdc, pts, pPoly->cpts); HeapFree( GetProcessHeap(), 0, pts ); break; @@ -921,7 +933,10 @@ BOOL WINAPI PlayEnhMetaFileRecord( pPoly->cpts * sizeof(POINT) ); DWORD i; for(i = 0; i < pPoly->cpts; i++) - CONV_POINT16TO32(pPoly->apts + i, pts + i); + { + pts[i].x = pPoly->apts[i].x; + pts[i].y = pPoly->apts[i].y; + } PolyBezierTo(hdc, pts, pPoly->cpts); HeapFree( GetProcessHeap(), 0, pts ); break; -- 2.11.4.GIT