diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-04-25 15:45:12 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-04-26 15:12:57 +0200 |
commit | a2f62569da0bb87b9d4c4d54e51d43be63ceb968 (patch) | |
tree | ef69f6a249a1b5d3f8a74af684ec6242fec9eb05 /source | |
parent | bd1609f3b55c9ec9a6d6e519381d755629de114e (diff) | |
download | mupdf-a2f62569da0bb87b9d4c4d54e51d43be63ceb968.tar.xz |
murun: Support 'lineCap' to set start, end and dash caps together.
Diffstat (limited to 'source')
-rw-r--r-- | source/tools/murun.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/tools/murun.c b/source/tools/murun.c index a42a4bbf..03e092f7 100644 --- a/source/tools/murun.c +++ b/source/tools/murun.c @@ -417,6 +417,11 @@ static void ffi_pushstroke(js_State *J, const fz_stroke_state *stroke) static fz_stroke_state ffi_tostroke(js_State *J, int idx) { fz_stroke_state stroke = fz_default_stroke_state; + if (js_hasproperty(J, idx, "lineCap")) { + stroke.start_cap = cap_from_string(js_tostring(J, -1)); + stroke.dash_cap = stroke.start_cap; + stroke.end_cap = stroke.start_cap; + } if (js_hasproperty(J, idx, "startCap")) { stroke.start_cap = cap_from_string(js_tostring(J, -1)); js_pop(J, 1); |