Implemented playback of EMR_POLYBEZIER{TO}16, EMR_POLYLINE16 and

EMR_POLYPOLYLINE.
This commit is contained in:
Huw D M Davies 2000-08-20 03:40:04 +00:00 committed by Alexandre Julliard
parent 56f8e274c7
commit c7acd78070
1 changed files with 56 additions and 5 deletions

View File

@ -543,7 +543,45 @@ BOOL WINAPI PlayEnhMetaFileRecord(
HeapFree( GetProcessHeap(), 0, pts ); HeapFree( GetProcessHeap(), 0, pts );
break; break;
} }
case EMR_POLYLINETO16:
{
PEMRPOLYLINETO16 pPoly = (PEMRPOLYLINETO16) mr;
/* Shouldn't use PolylineTo16 since pPoly->cpts is DWORD */
POINT *pts = HeapAlloc( GetProcessHeap(), 0,
pPoly->cpts * sizeof(POINT) );
DWORD i;
for(i = 0; i < pPoly->cpts; i++)
CONV_POINT16TO32(pPoly->apts + i, pts + i);
PolylineTo(hdc, pts, pPoly->cpts);
HeapFree( GetProcessHeap(), 0, pts );
break;
}
case EMR_POLYBEZIER16:
{
PEMRPOLYBEZIER16 pPoly = (PEMRPOLYBEZIER16) mr;
/* Shouldn't use PolyBezier16 since pPoly->cpts is DWORD */
POINT *pts = HeapAlloc( GetProcessHeap(), 0,
pPoly->cpts * sizeof(POINT) );
DWORD i;
for(i = 0; i < pPoly->cpts; i++)
CONV_POINT16TO32(pPoly->apts + i, pts + i);
PolyBezier(hdc, pts, pPoly->cpts);
HeapFree( GetProcessHeap(), 0, pts );
break;
}
case EMR_POLYBEZIERTO16:
{
PEMRPOLYBEZIERTO16 pPoly = (PEMRPOLYBEZIERTO16) mr;
/* Shouldn't use PolyBezierTo16 since pPoly->cpts is DWORD */
POINT *pts = HeapAlloc( GetProcessHeap(), 0,
pPoly->cpts * sizeof(POINT) );
DWORD i;
for(i = 0; i < pPoly->cpts; i++)
CONV_POINT16TO32(pPoly->apts + i, pts + i);
PolyBezierTo(hdc, pts, pPoly->cpts);
HeapFree( GetProcessHeap(), 0, pts );
break;
}
case EMR_POLYPOLYGON16: case EMR_POLYPOLYGON16:
{ {
PEMRPOLYPOLYGON16 pPolyPoly = (PEMRPOLYPOLYGON16) mr; PEMRPOLYPOLYGON16 pPolyPoly = (PEMRPOLYPOLYGON16) mr;
@ -561,6 +599,23 @@ BOOL WINAPI PlayEnhMetaFileRecord(
HeapFree( GetProcessHeap(), 0, pts ); HeapFree( GetProcessHeap(), 0, pts );
break; break;
} }
case EMR_POLYPOLYLINE16:
{
PEMRPOLYPOLYLINE16 pPolyPoly = (PEMRPOLYPOLYLINE16) mr;
/* NB POINTS array doesn't start at pPolyPoly->apts it's actually
pPolyPoly->aPolyCounts + pPolyPoly->nPolys */
POINT *pts = HeapAlloc( GetProcessHeap(), 0,
pPolyPoly->cpts * sizeof(POINT) );
DWORD i;
for(i = 0; i < pPolyPoly->cpts; i++)
CONV_POINT16TO32((POINTS*) (pPolyPoly->aPolyCounts +
pPolyPoly->nPolys) + i, pts + i);
PolyPolyline(hdc, pts, pPolyPoly->aPolyCounts, pPolyPoly->nPolys);
HeapFree( GetProcessHeap(), 0, pts );
break;
}
case EMR_STRETCHDIBITS: case EMR_STRETCHDIBITS:
{ {
@ -1107,10 +1162,6 @@ BOOL WINAPI PlayEnhMetaFileRecord(
case EMR_PLGBLT: case EMR_PLGBLT:
case EMR_SETDIBITSTODEVICE: case EMR_SETDIBITSTODEVICE:
case EMR_EXTTEXTOUTA: case EMR_EXTTEXTOUTA:
case EMR_POLYBEZIER16:
case EMR_POLYBEZIERTO16:
case EMR_POLYLINETO16:
case EMR_POLYPOLYLINE16:
case EMR_POLYDRAW16: case EMR_POLYDRAW16:
case EMR_CREATEMONOBRUSH: case EMR_CREATEMONOBRUSH:
case EMR_POLYTEXTOUTA: case EMR_POLYTEXTOUTA: