X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/5080469db3c8e85caa768da3f6d5b8050013900d..e91f8f2683c327f6f3476a702f5636b2b4547e69:/ps.c diff --git a/ps.c b/ps.c index 9f2c17f..f6a71bb 100644 --- a/ps.c +++ b/ps.c @@ -231,6 +231,17 @@ static void ps_line_width(void *handle, float width) ps_printf(ps, "%g setlinewidth\n", width); } +static void ps_line_dotted(void *handle, int dotted) +{ + psdata *ps = (psdata *)handle; + + if (dotted) { + ps_printf(ps, "[ currentlinewidth 3 mul ] 0 setdash\n"); + } else { + ps_printf(ps, "[ ] 0 setdash\n"); + } +} + static void ps_begin_doc(void *handle, int pages) { psdata *ps = (psdata *)handle; @@ -321,6 +332,7 @@ static const struct drawing_api ps_drawing = { ps_end_page, ps_end_doc, ps_line_width, + ps_line_dotted, }; psdata *ps_init(FILE *outfile, int colour)