From db076a5b3578ee995db9e70372fa9548ee7e1cb2 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Sun, 26 Mar 2023 12:15:11 +0200 Subject: [PATCH] wineps: Handle EMR_POLYLINETO16 record in spool files. --- dlls/wineps.drv/printproc.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/dlls/wineps.drv/printproc.c b/dlls/wineps.drv/printproc.c index ac09623b56e..a4a9debe1e0 100644 --- a/dlls/wineps.drv/printproc.c +++ b/dlls/wineps.drv/printproc.c @@ -393,6 +393,27 @@ static int WINAPI hmf_proc(HDC hdc, HANDLETABLE *htable, free(pts); return i; } + case EMR_POLYLINETO16: + { + const EMRPOLYLINETO16 *p = (const EMRPOLYLINETO16 *)rec; + POINT *pts; + DWORD cnt; + int i; + + cnt = p->cpts + 1; + pts = malloc(sizeof(*pts) * cnt); + if (!pts) return 0; + GetCurrentPositionEx(data->pdev->dev.hdc, pts); + for (i = 0; i < p->cpts; i++) + { + pts[i + 1].x = p->apts[i].x; + pts[i + 1].y = p->apts[i].y; + } + i = PSDRV_PolyPolyline(&data->pdev->dev, pts, &cnt, 1) && + MoveToEx(data->pdev->dev.hdc, pts[cnt - 1].x, pts[cnt - 1].y, NULL); + free(pts); + return i; + } case EMR_CREATEMONOBRUSH: { const EMRCREATEMONOBRUSH *p = (const EMRCREATEMONOBRUSH *)rec; -- 2.11.4.GIT