From 63ff31eacd13110674c70dd8eaf6ef2bd9ec71c2 Mon Sep 17 00:00:00 2001 From: Luc Tourangeau Date: Fri, 30 Jul 1999 18:04:25 +0000 Subject: [PATCH] Added a call to the newpath operator immediately before the arc operator. --- graphics/psdrv/ps.c | 12 ++++++++++++ include/psdrv.h | 1 + 2 files changed, 13 insertions(+) diff --git a/graphics/psdrv/ps.c b/graphics/psdrv/ps.c index b820f439848..892a51acec4 100644 --- a/graphics/psdrv/ps.c +++ b/graphics/psdrv/ps.c @@ -152,6 +152,9 @@ static char psfill[] = static char pseofill[] = "eofill\n"; +static char psnewpath[] = +"newpath\n"; + static char psclosepath[] = "closepath\n"; @@ -508,6 +511,10 @@ BOOL PSDRV_WriteArc(DC *dc, INT x, INT y, INT w, INT h, double ang1, /* Make angles -ve and swap order because we're working with an upside down y-axis */ sprintf(buf, psarc, x, y, w, h, -ang2, -ang1); + + /* Write newpath operator to ensure there's no line segment drawn + from the current point to the beginning of the arc. */ + PSDRV_WriteNewPath( dc ); return PSDRV_WriteSpool(dc, buf, strlen(buf)); } @@ -679,6 +686,11 @@ BOOL PSDRV_WriteGRestore(DC *dc) return PSDRV_WriteSpool(dc, psgrestore, sizeof(psgrestore)-1); } +BOOL PSDRV_WriteNewPath(DC *dc) +{ + return PSDRV_WriteSpool(dc, psnewpath, sizeof(psnewpath)-1); +} + BOOL PSDRV_WriteClosePath(DC *dc) { return PSDRV_WriteSpool(dc, psclosepath, sizeof(psclosepath)-1); diff --git a/include/psdrv.h b/include/psdrv.h index 3257079b9df..67e5ea73095 100644 --- a/include/psdrv.h +++ b/include/psdrv.h @@ -286,6 +286,7 @@ extern BOOL PSDRV_WriteFill(DC *dc); extern BOOL PSDRV_WriteEOFill(DC *dc); extern BOOL PSDRV_WriteGSave(DC *dc); extern BOOL PSDRV_WriteGRestore(DC *dc); +extern BOOL PSDRV_WriteNewPath(DC *dc); extern BOOL PSDRV_WriteClosePath(DC *dc); extern BOOL PSDRV_WriteClip(DC *dc); extern BOOL PSDRV_WriteRectClip(DC *dc, CHAR *pszArrayName);