Module: wine Branch: master Commit: 74c376dd4bd48d217a564b561276a8d3873d8651 URL: https://gitlab.winehq.org/wine/wine/-/commit/74c376dd4bd48d217a564b561276a8d...
Author: Piotr Caban piotr@codeweavers.com Date: Tue Apr 11 15:59:15 2023 +0200
wineps: Handle EMR_POLYDRAW16 record in spool files.
---
dlls/wineps.drv/printproc.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
diff --git a/dlls/wineps.drv/printproc.c b/dlls/wineps.drv/printproc.c index 79d02c9f170..30dd6f16e28 100644 --- a/dlls/wineps.drv/printproc.c +++ b/dlls/wineps.drv/printproc.c @@ -1112,6 +1112,24 @@ static int WINAPI hmf_proc(HDC hdc, HANDLETABLE *htable, free(pts); return i; } + case EMR_POLYDRAW16: + { + const EMRPOLYDRAW16 *p = (const EMRPOLYDRAW16 *)rec; + POINT *pts; + int i; + + pts = malloc(sizeof(*pts) * p->cpts); + if (!pts) return 0; + for (i = 0; i < p->cpts; i++) + { + pts[i].x = p->apts[i].x; + pts[i].y = p->apts[i].y; + } + i = poly_draw(&data->pdev->dev, pts, (BYTE *)(p->apts + p->cpts), p->cpts) && + MoveToEx(data->pdev->dev.hdc, pts[p->cpts - 1].x, pts[p->cpts - 1].y, NULL); + free(pts); + return i; + } case EMR_CREATEMONOBRUSH: { const EMRCREATEMONOBRUSH *p = (const EMRCREATEMONOBRUSH *)rec;