diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2013-10-30 16:38:31 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2013-11-05 15:56:28 +0100 |
commit | 1f930f64d8c5abf89b62b806efca1c64b216e413 (patch) | |
tree | cc740548df3b23ed77e0d98837207f66a92d9ea0 /source | |
parent | a7ea508d281352b1fae056b5c8e86648063b2629 (diff) | |
download | mupdf-1f930f64d8c5abf89b62b806efca1c64b216e413.tar.xz |
Improve stroke state function names that take the dash array length.
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/path.c | 8 | ||||
-rw-r--r-- | source/pdf/pdf-interpret.c | 4 | ||||
-rw-r--r-- | source/xps/xps-path.c | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/source/fitz/path.c b/source/fitz/path.c index d2ad27c3..811db282 100644 --- a/source/fitz/path.c +++ b/source/fitz/path.c @@ -393,7 +393,7 @@ fz_drop_stroke_state(fz_context *ctx, fz_stroke_state *stroke) } fz_stroke_state * -fz_new_stroke_state_with_len(fz_context *ctx, int len) +fz_new_stroke_state_with_dash_len(fz_context *ctx, int len) { fz_stroke_state *state; @@ -419,11 +419,11 @@ fz_new_stroke_state_with_len(fz_context *ctx, int len) fz_stroke_state * fz_new_stroke_state(fz_context *ctx) { - return fz_new_stroke_state_with_len(ctx, 0); + return fz_new_stroke_state_with_dash_len(ctx, 0); } fz_stroke_state * -fz_unshare_stroke_state_with_len(fz_context *ctx, fz_stroke_state *shared, int len) +fz_unshare_stroke_state_with_dash_len(fz_context *ctx, fz_stroke_state *shared, int len) { int single, unsize, shsize, shlen, drop; fz_stroke_state *unshared; @@ -456,5 +456,5 @@ fz_unshare_stroke_state_with_len(fz_context *ctx, fz_stroke_state *shared, int l fz_stroke_state * fz_unshare_stroke_state(fz_context *ctx, fz_stroke_state *shared) { - return fz_unshare_stroke_state_with_len(ctx, shared, shared->dash_len); + return fz_unshare_stroke_state_with_dash_len(ctx, shared, shared->dash_len); } diff --git a/source/pdf/pdf-interpret.c b/source/pdf/pdf-interpret.c index ee6fcc45..bfdf77ab 100644 --- a/source/pdf/pdf-interpret.c +++ b/source/pdf/pdf-interpret.c @@ -1721,7 +1721,7 @@ pdf_run_extgstate(pdf_csi *csi, pdf_obj *rdb, pdf_obj *extgstate) { pdf_obj *dashes = pdf_array_get(val, 0); int len = pdf_array_len(dashes); - gstate->stroke_state = fz_unshare_stroke_state_with_len(ctx, gstate->stroke_state, len); + gstate->stroke_state = fz_unshare_stroke_state_with_dash_len(ctx, gstate->stroke_state, len); gstate->stroke_state->dash_len = len; for (k = 0; k < len; k++) gstate->stroke_state->dash_list[k] = pdf_to_real(pdf_array_get(dashes, k)); @@ -2373,7 +2373,7 @@ static void pdf_run_d(pdf_csi *csi) array = csi->obj; len = pdf_array_len(array); - gstate->stroke_state = fz_unshare_stroke_state_with_len(csi->dev->ctx, gstate->stroke_state, len); + gstate->stroke_state = fz_unshare_stroke_state_with_dash_len(csi->dev->ctx, gstate->stroke_state, len); gstate->stroke_state->dash_len = len; for (i = 0; i < len; i++) gstate->stroke_state->dash_list[i] = pdf_to_real(pdf_array_get(array, i)); diff --git a/source/xps/xps-path.c b/source/xps/xps-path.c index 30d40aff..b97ee17d 100644 --- a/source/xps/xps-path.c +++ b/source/xps/xps-path.c @@ -922,7 +922,7 @@ xps_parse_path(xps_document *doc, const fz_matrix *ctm, char *base_uri, xps_reso s++; } } - stroke = fz_new_stroke_state_with_len(doc->ctx, dash_len); + stroke = fz_new_stroke_state_with_dash_len(doc->ctx, dash_len); stroke->start_cap = xps_parse_line_cap(stroke_start_line_cap_att); stroke->dash_cap = xps_parse_line_cap(stroke_dash_cap_att); stroke->end_cap = xps_parse_line_cap(stroke_end_line_cap_att); |