From ae9a91719bb234cfb6dca9dfca296d3d6d235575 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 3 Jul 2022 10:01:10 -0400 Subject: [PATCH] Add pdfioContentPathEnd function. --- CHANGES.md | 1 + pdfio-content.c | 11 +++++++++++ pdfio-content.h | 1 + 3 files changed, 13 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 69556cc..ab8ad7c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,7 @@ v1.1.0 (Month DD, YYYY) - Added `pdfioFileCreateTemporary` function (Issue #29) - Added `pdfioDictIterateKeys` function (Issue #31) +- Added `pdfioContentPathEnd` function. - Fixed "install-shared" target (Issue #32) - Fixed `pdfioContentMatrixRotate` function. diff --git a/pdfio-content.c b/pdfio-content.c index e1ccc3c..8f988c2 100644 --- a/pdfio-content.c +++ b/pdfio-content.c @@ -589,6 +589,17 @@ pdfioContentPathCurve23( } +// +// 'pdfioContentPathEnd()' - Clear the current path. +// + +bool // O - `true` on success, `false` on failure +pdfioContentPathEnd(pdfio_stream_t *st) // I - Stream +{ + return (pdfioStreamPuts(st, "n\n")); +} + + // // 'pdfioContentPathLineTo()' - Add a straight line to the current path. // diff --git a/pdfio-content.h b/pdfio-content.h index 412b62f..ab06e14 100644 --- a/pdfio-content.h +++ b/pdfio-content.h @@ -91,6 +91,7 @@ extern bool pdfioContentPathClose(pdfio_stream_t *st) _PDFIO_PUBLIC; extern bool pdfioContentPathCurve(pdfio_stream_t *st, double x1, double y1, double x2, double y2, double x3, double y3) _PDFIO_PUBLIC; extern bool pdfioContentPathCurve13(pdfio_stream_t *st, double x1, double y1, double x3, double y3) _PDFIO_PUBLIC; extern bool pdfioContentPathCurve23(pdfio_stream_t *st, double x2, double y2, double x3, double y3) _PDFIO_PUBLIC; +extern bool pdfioContentPathEnd(pdfio_stream_t *st) _PDFIO_PUBLIC; extern bool pdfioContentPathLineTo(pdfio_stream_t *st, double x, double y) _PDFIO_PUBLIC; extern bool pdfioContentPathMoveTo(pdfio_stream_t *st, double x, double y) _PDFIO_PUBLIC; extern bool pdfioContentPathRect(pdfio_stream_t *st, double x, double y, double width, double height) _PDFIO_PUBLIC;