Tidy up of PlayEnhMetaFileRecord - fixes PolyPoly* functions.
This commit is contained in:
parent
27d31a5d43
commit
c9315fe820
|
@ -322,42 +322,7 @@ BOOL WINAPI PlayEnhMetaFileRecord(
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
case EMR_HEADER:
|
case EMR_HEADER:
|
||||||
{
|
break;
|
||||||
#if 0
|
|
||||||
ENHMETAHEADER* h = (LPENHMETAHEADER)mr;
|
|
||||||
XFORM dcTransform;
|
|
||||||
|
|
||||||
/* Scale the enhanced metafile according to the reference hdc
|
|
||||||
it was created with */
|
|
||||||
if( h->szlDevice.cx )
|
|
||||||
{
|
|
||||||
dcTransform.eM11 = (FLOAT)( (DOUBLE)GetDeviceCaps( hdc, HORZRES ) /
|
|
||||||
(DOUBLE)h->szlDevice.cx );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ERR( "Invalid szlDevice.cx in header\n" );
|
|
||||||
dcTransform.eM11 = (FLOAT)1.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( h->szlDevice.cy )
|
|
||||||
{
|
|
||||||
dcTransform.eM22 = (FLOAT)( (DOUBLE)GetDeviceCaps( hdc, VERTRES ) /
|
|
||||||
(DOUBLE)h->szlDevice.cy );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ERR( "Invalid szlDevice.cy in header\n" );
|
|
||||||
dcTransform.eM22 = (FLOAT)1.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
dcTransform.eM12 = dcTransform.eM21 = (FLOAT)0;
|
|
||||||
dcTransform.eDx = dcTransform.eDy = (FLOAT)0;
|
|
||||||
|
|
||||||
ModifyWorldTransform( hdc, &dcTransform, MWT_RIGHTMULTIPLY );
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case EMR_EOF:
|
case EMR_EOF:
|
||||||
break;
|
break;
|
||||||
case EMR_GDICOMMENT:
|
case EMR_GDICOMMENT:
|
||||||
|
@ -369,50 +334,50 @@ BOOL WINAPI PlayEnhMetaFileRecord(
|
||||||
}
|
}
|
||||||
case EMR_SETMAPMODE:
|
case EMR_SETMAPMODE:
|
||||||
{
|
{
|
||||||
DWORD mode = mr->dParm[0];
|
PEMRSETMAPMODE pSetMapMode = (PEMRSETMAPMODE) mr;
|
||||||
SetMapMode(hdc, mode);
|
SetMapMode(hdc, pSetMapMode->iMode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_SETBKMODE:
|
case EMR_SETBKMODE:
|
||||||
{
|
{
|
||||||
DWORD mode = mr->dParm[0];
|
PEMRSETBKMODE pSetBkMode = (PEMRSETBKMODE) mr;
|
||||||
SetBkMode(hdc, mode);
|
SetBkMode(hdc, pSetBkMode->iMode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_SETBKCOLOR:
|
case EMR_SETBKCOLOR:
|
||||||
{
|
{
|
||||||
DWORD mode = mr->dParm[0];
|
PEMRSETBKCOLOR pSetBkColor = (PEMRSETBKCOLOR) mr;
|
||||||
SetBkColor(hdc, mode);
|
SetBkColor(hdc, pSetBkColor->crColor);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_SETPOLYFILLMODE:
|
case EMR_SETPOLYFILLMODE:
|
||||||
{
|
{
|
||||||
DWORD mode = mr->dParm[0];
|
PEMRSETPOLYFILLMODE pSetPolyFillMode = (PEMRSETPOLYFILLMODE) mr;
|
||||||
SetPolyFillMode(hdc, mode);
|
SetPolyFillMode(hdc, pSetPolyFillMode->iMode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_SETROP2:
|
case EMR_SETROP2:
|
||||||
{
|
{
|
||||||
DWORD mode = mr->dParm[0];
|
PEMRSETROP2 pSetROP2 = (PEMRSETROP2) mr;
|
||||||
SetROP2(hdc, mode);
|
SetROP2(hdc, pSetROP2->iMode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_SETSTRETCHBLTMODE:
|
case EMR_SETSTRETCHBLTMODE:
|
||||||
{
|
{
|
||||||
DWORD mode = mr->dParm[0];
|
PEMRSETSTRETCHBLTMODE pSetStretchBltMode = (PEMRSETSTRETCHBLTMODE) mr;
|
||||||
SetStretchBltMode(hdc, mode);
|
SetStretchBltMode(hdc, pSetStretchBltMode->iMode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_SETTEXTALIGN:
|
case EMR_SETTEXTALIGN:
|
||||||
{
|
{
|
||||||
DWORD align = mr->dParm[0];
|
PEMRSETTEXTALIGN pSetTextAlign = (PEMRSETTEXTALIGN) mr;
|
||||||
SetTextAlign(hdc, align);
|
SetTextAlign(hdc, pSetTextAlign->iMode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_SETTEXTCOLOR:
|
case EMR_SETTEXTCOLOR:
|
||||||
{
|
{
|
||||||
DWORD color = mr->dParm[0];
|
PEMRSETTEXTCOLOR pSetTextColor = (PEMRSETTEXTCOLOR) mr;
|
||||||
SetTextColor(hdc, color);
|
SetTextColor(hdc, pSetTextColor->crColor);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_SAVEDC:
|
case EMR_SAVEDC:
|
||||||
|
@ -422,139 +387,178 @@ BOOL WINAPI PlayEnhMetaFileRecord(
|
||||||
}
|
}
|
||||||
case EMR_RESTOREDC:
|
case EMR_RESTOREDC:
|
||||||
{
|
{
|
||||||
RestoreDC(hdc, mr->dParm[0]);
|
PEMRRESTOREDC pRestoreDC = (PEMRRESTOREDC) mr;
|
||||||
|
RestoreDC(hdc, pRestoreDC->iRelative);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_INTERSECTCLIPRECT:
|
case EMR_INTERSECTCLIPRECT:
|
||||||
{
|
{
|
||||||
INT left = mr->dParm[0], top = mr->dParm[1], right = mr->dParm[2],
|
PEMRINTERSECTCLIPRECT pClipRect = (PEMRINTERSECTCLIPRECT) mr;
|
||||||
bottom = mr->dParm[3];
|
IntersectClipRect(hdc, pClipRect->rclClip.left, pClipRect->rclClip.top,
|
||||||
IntersectClipRect(hdc, left, top, right, bottom);
|
pClipRect->rclClip.right, pClipRect->rclClip.bottom);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_SELECTOBJECT:
|
case EMR_SELECTOBJECT:
|
||||||
{
|
{
|
||||||
DWORD obj = mr->dParm[0];
|
PEMRSELECTOBJECT pSelectObject = (PEMRSELECTOBJECT) mr;
|
||||||
SelectObject(hdc, (handletable->objectHandle)[obj]);
|
if( pSelectObject->ihObject & 0x80000000 ) {
|
||||||
|
/* High order bit is set - it's a stock object
|
||||||
|
* Strip the high bit to get the index.
|
||||||
|
* See MSDN article Q142319
|
||||||
|
*/
|
||||||
|
SelectObject( hdc, GetStockObject( pSelectObject->ihObject &
|
||||||
|
0x7fffffff ) );
|
||||||
|
} else {
|
||||||
|
/* High order bit wasn't set - not a stock object
|
||||||
|
*/
|
||||||
|
SelectObject( hdc,
|
||||||
|
(handletable->objectHandle)[pSelectObject->ihObject] );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_DELETEOBJECT:
|
case EMR_DELETEOBJECT:
|
||||||
{
|
{
|
||||||
DWORD obj = mr->dParm[0];
|
PEMRDELETEOBJECT pDeleteObject = (PEMRDELETEOBJECT) mr;
|
||||||
DeleteObject( (handletable->objectHandle)[obj]);
|
DeleteObject( (handletable->objectHandle)[pDeleteObject->ihObject]);
|
||||||
(handletable->objectHandle)[obj] = 0;
|
(handletable->objectHandle)[pDeleteObject->ihObject] = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_SETWINDOWORGEX:
|
case EMR_SETWINDOWORGEX:
|
||||||
{
|
{
|
||||||
DWORD x = mr->dParm[0], y = mr->dParm[1];
|
PEMRSETWINDOWORGEX pSetWindowOrgEx = (PEMRSETWINDOWORGEX) mr;
|
||||||
SetWindowOrgEx(hdc, x, y, NULL);
|
SetWindowOrgEx(hdc, pSetWindowOrgEx->ptlOrigin.x,
|
||||||
|
pSetWindowOrgEx->ptlOrigin.y, NULL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_SETWINDOWEXTEX:
|
case EMR_SETWINDOWEXTEX:
|
||||||
{
|
{
|
||||||
DWORD x = mr->dParm[0], y = mr->dParm[1];
|
PEMRSETWINDOWEXTEX pSetWindowExtEx = (PEMRSETWINDOWEXTEX) mr;
|
||||||
SetWindowExtEx(hdc, x, y, NULL);
|
SetWindowExtEx(hdc, pSetWindowExtEx->szlExtent.cx,
|
||||||
|
pSetWindowExtEx->szlExtent.cy, NULL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_SETVIEWPORTORGEX:
|
case EMR_SETVIEWPORTORGEX:
|
||||||
{
|
{
|
||||||
DWORD x = mr->dParm[0], y = mr->dParm[1];
|
PEMRSETVIEWPORTORGEX pSetViewportOrgEx = (PEMRSETVIEWPORTORGEX) mr;
|
||||||
SetViewportOrgEx(hdc, x, y, NULL);
|
SetViewportOrgEx(hdc, pSetViewportOrgEx->ptlOrigin.x,
|
||||||
|
pSetViewportOrgEx->ptlOrigin.y, NULL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_SETVIEWPORTEXTEX:
|
case EMR_SETVIEWPORTEXTEX:
|
||||||
{
|
{
|
||||||
DWORD x = mr->dParm[0], y = mr->dParm[1];
|
PEMRSETVIEWPORTEXTEX pSetViewportExtEx = (PEMRSETVIEWPORTEXTEX) mr;
|
||||||
SetViewportExtEx(hdc, x, y, NULL);
|
SetViewportExtEx(hdc, pSetViewportExtEx->szlExtent.cx,
|
||||||
|
pSetViewportExtEx->szlExtent.cy, NULL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_CREATEPEN:
|
case EMR_CREATEPEN:
|
||||||
{
|
{
|
||||||
DWORD obj = mr->dParm[0];
|
PEMRCREATEPEN pCreatePen = (PEMRCREATEPEN) mr;
|
||||||
(handletable->objectHandle)[obj] =
|
(handletable->objectHandle)[pCreatePen->ihPen] =
|
||||||
CreatePenIndirect((LOGPEN *) &(mr->dParm[1]));
|
CreatePenIndirect(&pCreatePen->lopn);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_EXTCREATEPEN:
|
case EMR_EXTCREATEPEN:
|
||||||
{
|
{
|
||||||
DWORD obj = mr->dParm[0];
|
PEMREXTCREATEPEN pPen = (PEMREXTCREATEPEN) mr;
|
||||||
DWORD style = mr->dParm[1], brush = mr->dParm[2];
|
LOGBRUSH lb;
|
||||||
LOGBRUSH *b = (LOGBRUSH *) &mr->dParm[3];
|
lb.lbStyle = pPen->elp.elpBrushStyle;
|
||||||
FIXME("Some ExtCreatePen args not handled\n");
|
lb.lbColor = pPen->elp.elpColor;
|
||||||
(handletable->objectHandle)[obj] =
|
lb.lbHatch = pPen->elp.elpHatch;
|
||||||
ExtCreatePen(style, brush, b, 0, NULL);
|
|
||||||
|
if(pPen->offBmi || pPen->offBits)
|
||||||
|
FIXME("EMR_EXTCREATEPEN: Need to copy brush bitmap\n");
|
||||||
|
|
||||||
|
(handletable->objectHandle)[pPen->ihPen] =
|
||||||
|
ExtCreatePen(pPen->elp.elpPenStyle, pPen->elp.elpWidth, &lb,
|
||||||
|
pPen->elp.elpNumEntries, pPen->elp.elpStyleEntry);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_CREATEBRUSHINDIRECT:
|
case EMR_CREATEBRUSHINDIRECT:
|
||||||
{
|
{
|
||||||
DWORD obj = mr->dParm[0];
|
PEMRCREATEBRUSHINDIRECT pBrush = (PEMRCREATEBRUSHINDIRECT) mr;
|
||||||
(handletable->objectHandle)[obj] =
|
(handletable->objectHandle)[pBrush->ihBrush] =
|
||||||
CreateBrushIndirect((LOGBRUSH *) &(mr->dParm[1]));
|
CreateBrushIndirect(&pBrush->lb);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_EXTCREATEFONTINDIRECTW:
|
case EMR_EXTCREATEFONTINDIRECTW:
|
||||||
{
|
{
|
||||||
DWORD obj = mr->dParm[0];
|
PEMREXTCREATEFONTINDIRECTW pFont = (PEMREXTCREATEFONTINDIRECTW) mr;
|
||||||
(handletable->objectHandle)[obj] =
|
(handletable->objectHandle)[pFont->ihFont] =
|
||||||
CreateFontIndirectW((LOGFONTW *) &(mr->dParm[1]));
|
CreateFontIndirectW(&pFont->elfw.elfLogFont);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_MOVETOEX:
|
case EMR_MOVETOEX:
|
||||||
{
|
{
|
||||||
DWORD x = mr->dParm[0], y = mr->dParm[1];
|
PEMRMOVETOEX pMoveToEx = (PEMRMOVETOEX) mr;
|
||||||
MoveToEx(hdc, x, y, NULL);
|
MoveToEx(hdc, pMoveToEx->ptl.x, pMoveToEx->ptl.y, NULL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_LINETO:
|
case EMR_LINETO:
|
||||||
{
|
{
|
||||||
DWORD x = mr->dParm[0], y = mr->dParm[1];
|
PEMRLINETO pLineTo = (PEMRLINETO) mr;
|
||||||
LineTo(hdc, x, y);
|
LineTo(hdc, pLineTo->ptl.x, pLineTo->ptl.y);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_RECTANGLE:
|
case EMR_RECTANGLE:
|
||||||
{
|
{
|
||||||
INT left = mr->dParm[0], top = mr->dParm[1], right = mr->dParm[2],
|
PEMRRECTANGLE pRect = (PEMRRECTANGLE) mr;
|
||||||
bottom = mr->dParm[3];
|
Rectangle(hdc, pRect->rclBox.left, pRect->rclBox.top,
|
||||||
Rectangle(hdc, left, top, right, bottom);
|
pRect->rclBox.right, pRect->rclBox.bottom);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_ELLIPSE:
|
case EMR_ELLIPSE:
|
||||||
{
|
{
|
||||||
INT left = mr->dParm[0], top = mr->dParm[1], right = mr->dParm[2],
|
PEMRELLIPSE pEllipse = (PEMRELLIPSE) mr;
|
||||||
bottom = mr->dParm[3];
|
Ellipse(hdc, pEllipse->rclBox.left, pEllipse->rclBox.top,
|
||||||
Ellipse(hdc, left, top, right, bottom);
|
pEllipse->rclBox.right, pEllipse->rclBox.bottom);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_POLYGON16:
|
case EMR_POLYGON16:
|
||||||
{
|
{
|
||||||
/* 0-3 : a bounding rectangle? */
|
PEMRPOLYGON16 pPoly = (PEMRPOLYGON16) mr;
|
||||||
INT count = mr->dParm[4];
|
/* Shouldn't use Polygon16 since pPoly->cpts is DWORD */
|
||||||
FIXME("Some Polygon16 args not handled\n");
|
POINT *pts = HeapAlloc( GetProcessHeap(), 0,
|
||||||
Polygon16(hdc, (POINT16 *)&mr->dParm[5], count);
|
pPoly->cpts * sizeof(POINT) );
|
||||||
|
DWORD i;
|
||||||
|
for(i = 0; i < pPoly->cpts; i++)
|
||||||
|
CONV_POINT16TO32(pPoly->apts + i, pts + i);
|
||||||
|
Polygon(hdc, pts, pPoly->cpts);
|
||||||
|
HeapFree( GetProcessHeap(), 0, pts );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMR_POLYLINE16:
|
case EMR_POLYLINE16:
|
||||||
{
|
{
|
||||||
/* 0-3 : a bounding rectangle? */
|
PEMRPOLYLINE16 pPoly = (PEMRPOLYLINE16) mr;
|
||||||
INT count = mr->dParm[4];
|
/* Shouldn't use Polyline16 since pPoly->cpts is DWORD */
|
||||||
FIXME("Some Polyline16 args not handled\n");
|
POINT *pts = HeapAlloc( GetProcessHeap(), 0,
|
||||||
Polyline16(hdc, (POINT16 *)&mr->dParm[5], count);
|
pPoly->cpts * sizeof(POINT) );
|
||||||
|
DWORD i;
|
||||||
|
for(i = 0; i < pPoly->cpts; i++)
|
||||||
|
CONV_POINT16TO32(pPoly->apts + i, pts + i);
|
||||||
|
Polyline(hdc, pts, pPoly->cpts);
|
||||||
|
HeapFree( GetProcessHeap(), 0, pts );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
case EMR_POLYPOLYGON16:
|
case EMR_POLYPOLYGON16:
|
||||||
{
|
{
|
||||||
PEMRPOLYPOLYGON16 lpPolyPoly16 = (PEMRPOLYPOLYGON16)mr;
|
PEMRPOLYPOLYGON16 pPolyPoly = (PEMRPOLYPOLYGON16) mr;
|
||||||
|
/* NB POINTS array doesn't start at pPolyPoly->apts it's actually
|
||||||
|
pPolyPoly->aPolyCounts + pPolyPoly->nPolys */
|
||||||
|
|
||||||
PolyPolygon16( hdc,
|
POINT *pts = HeapAlloc( GetProcessHeap(), 0,
|
||||||
lpPolyPoly16->apts,
|
pPolyPoly->cpts * sizeof(POINT) );
|
||||||
lpPolyPoly16->aPolyCounts,
|
DWORD i;
|
||||||
lpPolyPoly16->nPolys );
|
for(i = 0; i < pPolyPoly->cpts; i++)
|
||||||
|
CONV_POINT16TO32((POINTS*) (pPolyPoly->aPolyCounts +
|
||||||
|
pPolyPoly->nPolys) + i, pts + i);
|
||||||
|
|
||||||
|
PolyPolygon(hdc, pts, (INT*)pPolyPoly->aPolyCounts, pPolyPoly->nPolys);
|
||||||
|
HeapFree( GetProcessHeap(), 0, pts );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
case EMR_STRETCHDIBITS:
|
case EMR_STRETCHDIBITS:
|
||||||
{
|
{
|
||||||
LONG xDest = mr->dParm[4];
|
LONG xDest = mr->dParm[4];
|
||||||
|
@ -648,88 +652,62 @@ BOOL WINAPI PlayEnhMetaFileRecord(
|
||||||
case EMR_POLYBEZIER:
|
case EMR_POLYBEZIER:
|
||||||
{
|
{
|
||||||
PEMRPOLYBEZIER lpPolyBez = (PEMRPOLYBEZIER)mr;
|
PEMRPOLYBEZIER lpPolyBez = (PEMRPOLYBEZIER)mr;
|
||||||
|
PolyBezier(hdc, (const LPPOINT)lpPolyBez->aptl, (UINT)lpPolyBez->cptl);
|
||||||
FIXME( "Bounding rectangle ignored for EMR_POLYBEZIER\n" );
|
|
||||||
PolyBezier( hdc, (const LPPOINT)lpPolyBez->aptl, (UINT)lpPolyBez->cptl );
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EMR_POLYGON:
|
case EMR_POLYGON:
|
||||||
{
|
{
|
||||||
PEMRPOLYGON lpPoly = (PEMRPOLYGON)mr;
|
PEMRPOLYGON lpPoly = (PEMRPOLYGON)mr;
|
||||||
|
|
||||||
FIXME( "Bounding rectangle ignored for EMR_POLYGON\n" );
|
|
||||||
Polygon( hdc, (const LPPOINT)lpPoly->aptl, (UINT)lpPoly->cptl );
|
Polygon( hdc, (const LPPOINT)lpPoly->aptl, (UINT)lpPoly->cptl );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EMR_POLYLINE:
|
case EMR_POLYLINE:
|
||||||
{
|
{
|
||||||
PEMRPOLYLINE lpPolyLine = (PEMRPOLYLINE)mr;
|
PEMRPOLYLINE lpPolyLine = (PEMRPOLYLINE)mr;
|
||||||
|
Polyline(hdc, (const LPPOINT)lpPolyLine->aptl, (UINT)lpPolyLine->cptl);
|
||||||
FIXME( "Bounding rectangle ignored for EMR_POLYLINE\n" );
|
|
||||||
Polyline( hdc, (const LPPOINT)lpPolyLine->aptl, (UINT)lpPolyLine->cptl );
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EMR_POLYBEZIERTO:
|
case EMR_POLYBEZIERTO:
|
||||||
{
|
{
|
||||||
PEMRPOLYBEZIERTO lpPolyBezierTo = (PEMRPOLYBEZIERTO)mr;
|
PEMRPOLYBEZIERTO lpPolyBezierTo = (PEMRPOLYBEZIERTO)mr;
|
||||||
|
PolyBezierTo( hdc, (const LPPOINT)lpPolyBezierTo->aptl,
|
||||||
FIXME( "Bounding rectangle ignored for EMR_POLYBEZIERTO\n" );
|
(UINT)lpPolyBezierTo->cptl );
|
||||||
PolyBezierTo( hdc, (const LPPOINT)lpPolyBezierTo->aptl, (UINT)lpPolyBezierTo->cptl );
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EMR_POLYLINETO:
|
case EMR_POLYLINETO:
|
||||||
{
|
{
|
||||||
PEMRPOLYLINETO lpPolyLineTo = (PEMRPOLYLINETO)mr;
|
PEMRPOLYLINETO lpPolyLineTo = (PEMRPOLYLINETO)mr;
|
||||||
|
PolylineTo( hdc, (const LPPOINT)lpPolyLineTo->aptl,
|
||||||
FIXME( "Bounding rectangle ignored for EMR_POLYLINETO\n" );
|
(UINT)lpPolyLineTo->cptl );
|
||||||
PolylineTo( hdc, (const LPPOINT)lpPolyLineTo->aptl, (UINT)lpPolyLineTo->cptl );
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EMR_POLYPOLYLINE:
|
case EMR_POLYPOLYLINE:
|
||||||
{
|
{
|
||||||
PEMRPOLYPOLYLINE lpPolyPolyLine = (PEMRPOLYPOLYLINE)mr;
|
PEMRPOLYPOLYLINE pPolyPolyline = (PEMRPOLYPOLYLINE) mr;
|
||||||
|
/* NB Points at pPolyPolyline->aPolyCounts + pPolyPolyline->nPolys */
|
||||||
|
|
||||||
FIXME( "Bounding rectangle ignored for EMR_POLYPOLYLINE\n" );
|
PolyPolyline(hdc, (LPPOINT)(pPolyPolyline->aPolyCounts +
|
||||||
PolyPolyline( hdc,
|
pPolyPolyline->nPolys),
|
||||||
(const LPPOINT)lpPolyPolyLine->aptl,
|
pPolyPolyline->aPolyCounts,
|
||||||
lpPolyPolyLine->aPolyCounts,
|
pPolyPolyline->nPolys );
|
||||||
lpPolyPolyLine->nPolys );
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EMR_POLYPOLYGON:
|
case EMR_POLYPOLYGON:
|
||||||
{
|
{
|
||||||
PEMRPOLYPOLYGON lpPolyPolygon = (PEMRPOLYPOLYGON)mr;
|
PEMRPOLYPOLYGON pPolyPolygon = (PEMRPOLYPOLYGON) mr;
|
||||||
INT* lpPolyCounts;
|
|
||||||
UINT i;
|
|
||||||
|
|
||||||
/* We get the polygon point counts in a dword struct. Transform
|
/* NB Points at pPolyPolygon->aPolyCounts + pPolyPolygon->nPolys */
|
||||||
this into an INT struct */
|
|
||||||
lpPolyCounts = (INT*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
|
|
||||||
sizeof(INT)*lpPolyPolygon->cptl );
|
|
||||||
|
|
||||||
for( i=0; i<lpPolyPolygon->cptl; i++ )
|
|
||||||
{
|
|
||||||
lpPolyCounts[i] = (INT)lpPolyPolygon->aPolyCounts[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
FIXME( "Bounding rectangle ignored for EMR_POLYPOLYGON\n" );
|
|
||||||
PolyPolygon( hdc, (const LPPOINT)lpPolyPolygon->aptl,
|
|
||||||
lpPolyCounts, lpPolyPolygon->nPolys );
|
|
||||||
|
|
||||||
HeapFree( GetProcessHeap(), 0, lpPolyCounts );
|
|
||||||
|
|
||||||
|
PolyPolygon(hdc, (LPPOINT)(pPolyPolygon->aPolyCounts +
|
||||||
|
pPolyPolygon->nPolys),
|
||||||
|
(INT*)pPolyPolygon->aPolyCounts, pPolyPolygon->nPolys );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -948,8 +926,6 @@ BOOL WINAPI PlayEnhMetaFileRecord(
|
||||||
case EMR_POLYDRAW:
|
case EMR_POLYDRAW:
|
||||||
{
|
{
|
||||||
PEMRPOLYDRAW lpPolyDraw = (PEMRPOLYDRAW)mr;
|
PEMRPOLYDRAW lpPolyDraw = (PEMRPOLYDRAW)mr;
|
||||||
|
|
||||||
FIXME( "Bounding rectangle ignored for EMR_POLYDRAW\n" );
|
|
||||||
PolyDraw( hdc,
|
PolyDraw( hdc,
|
||||||
(const LPPOINT)lpPolyDraw->aptl,
|
(const LPPOINT)lpPolyDraw->aptl,
|
||||||
lpPolyDraw->abTypes,
|
lpPolyDraw->abTypes,
|
||||||
|
@ -961,18 +937,14 @@ BOOL WINAPI PlayEnhMetaFileRecord(
|
||||||
case EMR_SETARCDIRECTION:
|
case EMR_SETARCDIRECTION:
|
||||||
{
|
{
|
||||||
PEMRSETARCDIRECTION lpSetArcDirection = (PEMRSETARCDIRECTION)mr;
|
PEMRSETARCDIRECTION lpSetArcDirection = (PEMRSETARCDIRECTION)mr;
|
||||||
|
|
||||||
SetArcDirection( hdc, (INT)lpSetArcDirection->iArcDirection );
|
SetArcDirection( hdc, (INT)lpSetArcDirection->iArcDirection );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EMR_SETMITERLIMIT:
|
case EMR_SETMITERLIMIT:
|
||||||
{
|
{
|
||||||
PEMRSETMITERLIMIT lpSetMiterLimit = (PEMRSETMITERLIMIT)mr;
|
PEMRSETMITERLIMIT lpSetMiterLimit = (PEMRSETMITERLIMIT)mr;
|
||||||
|
|
||||||
SetMiterLimit( hdc, lpSetMiterLimit->eMiterLimit, NULL );
|
SetMiterLimit( hdc, lpSetMiterLimit->eMiterLimit, NULL );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -997,30 +969,21 @@ BOOL WINAPI PlayEnhMetaFileRecord(
|
||||||
case EMR_FILLPATH:
|
case EMR_FILLPATH:
|
||||||
{
|
{
|
||||||
/*PEMRFILLPATH lpFillPath = (PEMRFILLPATH)mr;*/
|
/*PEMRFILLPATH lpFillPath = (PEMRFILLPATH)mr;*/
|
||||||
|
|
||||||
FIXME( "Bounding rectangle ignored for EMR_FILLPATH\n" );
|
|
||||||
FillPath( hdc );
|
FillPath( hdc );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EMR_STROKEANDFILLPATH:
|
case EMR_STROKEANDFILLPATH:
|
||||||
{
|
{
|
||||||
/*PEMRSTROKEANDFILLPATH lpStrokeAndFillPath = (PEMRSTROKEANDFILLPATH)mr;*/
|
/*PEMRSTROKEANDFILLPATH lpStrokeAndFillPath = (PEMRSTROKEANDFILLPATH)mr;*/
|
||||||
|
|
||||||
FIXME( "Bounding rectangle ignored for EMR_STROKEANDFILLPATH\n" );
|
|
||||||
StrokeAndFillPath( hdc );
|
StrokeAndFillPath( hdc );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EMR_STROKEPATH:
|
case EMR_STROKEPATH:
|
||||||
{
|
{
|
||||||
/*PEMRSTROKEPATH lpStrokePath = (PEMRSTROKEPATH)mr;*/
|
/*PEMRSTROKEPATH lpStrokePath = (PEMRSTROKEPATH)mr;*/
|
||||||
|
|
||||||
FIXME( "Bounding rectangle ignored for EMR_STROKEPATH\n" );
|
|
||||||
StrokePath( hdc );
|
StrokePath( hdc );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1039,9 +1002,7 @@ BOOL WINAPI PlayEnhMetaFileRecord(
|
||||||
case EMR_SELECTCLIPPATH:
|
case EMR_SELECTCLIPPATH:
|
||||||
{
|
{
|
||||||
PEMRSELECTCLIPPATH lpSelectClipPath = (PEMRSELECTCLIPPATH)mr;
|
PEMRSELECTCLIPPATH lpSelectClipPath = (PEMRSELECTCLIPPATH)mr;
|
||||||
|
|
||||||
SelectClipPath( hdc, (INT)lpSelectClipPath->iMode );
|
SelectClipPath( hdc, (INT)lpSelectClipPath->iMode );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1054,39 +1015,30 @@ BOOL WINAPI PlayEnhMetaFileRecord(
|
||||||
case EMR_CREATECOLORSPACE:
|
case EMR_CREATECOLORSPACE:
|
||||||
{
|
{
|
||||||
PEMRCREATECOLORSPACE lpCreateColorSpace = (PEMRCREATECOLORSPACE)mr;
|
PEMRCREATECOLORSPACE lpCreateColorSpace = (PEMRCREATECOLORSPACE)mr;
|
||||||
|
|
||||||
(handletable->objectHandle)[lpCreateColorSpace->ihCS] =
|
(handletable->objectHandle)[lpCreateColorSpace->ihCS] =
|
||||||
CreateColorSpaceA( &lpCreateColorSpace->lcs );
|
CreateColorSpaceA( &lpCreateColorSpace->lcs );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EMR_SETCOLORSPACE:
|
case EMR_SETCOLORSPACE:
|
||||||
{
|
{
|
||||||
PEMRSETCOLORSPACE lpSetColorSpace = (PEMRSETCOLORSPACE)mr;
|
PEMRSETCOLORSPACE lpSetColorSpace = (PEMRSETCOLORSPACE)mr;
|
||||||
|
|
||||||
SetColorSpace( hdc,
|
SetColorSpace( hdc,
|
||||||
(handletable->objectHandle)[lpSetColorSpace->ihCS] );
|
(handletable->objectHandle)[lpSetColorSpace->ihCS] );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EMR_DELETECOLORSPACE:
|
case EMR_DELETECOLORSPACE:
|
||||||
{
|
{
|
||||||
PEMRDELETECOLORSPACE lpDeleteColorSpace = (PEMRDELETECOLORSPACE)mr;
|
PEMRDELETECOLORSPACE lpDeleteColorSpace = (PEMRDELETECOLORSPACE)mr;
|
||||||
|
|
||||||
DeleteColorSpace( (handletable->objectHandle)[lpDeleteColorSpace->ihCS] );
|
DeleteColorSpace( (handletable->objectHandle)[lpDeleteColorSpace->ihCS] );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EMR_SETICMMODE:
|
case EMR_SETICMMODE:
|
||||||
{
|
{
|
||||||
PERMSETICMMODE lpSetICMMode = (PERMSETICMMODE)mr;
|
PERMSETICMMODE lpSetICMMode = (PERMSETICMMODE)mr;
|
||||||
|
SetICMMode( hdc, (INT)lpSetICMMode->iMode );
|
||||||
SetICMMode( hdc,
|
|
||||||
(INT)lpSetICMMode->iMode );
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1156,7 +1108,6 @@ BOOL WINAPI PlayEnhMetaFileRecord(
|
||||||
case EMR_POLYBEZIERTO16:
|
case EMR_POLYBEZIERTO16:
|
||||||
case EMR_POLYLINETO16:
|
case EMR_POLYLINETO16:
|
||||||
case EMR_POLYPOLYLINE16:
|
case EMR_POLYPOLYLINE16:
|
||||||
case EMR_POLYPOLYGON16:
|
|
||||||
case EMR_POLYDRAW16:
|
case EMR_POLYDRAW16:
|
||||||
case EMR_CREATEMONOBRUSH:
|
case EMR_CREATEMONOBRUSH:
|
||||||
case EMR_POLYTEXTOUTA:
|
case EMR_POLYTEXTOUTA:
|
||||||
|
|
Loading…
Reference in New Issue