summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2013-10-30 16:38:31 +0100
committerTor Andersson <tor.andersson@artifex.com>2013-11-05 15:56:28 +0100
commit1f930f64d8c5abf89b62b806efca1c64b216e413 (patch)
treecc740548df3b23ed77e0d98837207f66a92d9ea0
parenta7ea508d281352b1fae056b5c8e86648063b2629 (diff)
downloadmupdf-1f930f64d8c5abf89b62b806efca1c64b216e413.tar.xz
Improve stroke state function names that take the dash array length.
-rw-r--r--include/mupdf/fitz/path.h4
-rw-r--r--source/fitz/path.c8
-rw-r--r--source/pdf/pdf-interpret.c4
-rw-r--r--source/xps/xps-path.c2
4 files changed, 9 insertions, 9 deletions
diff --git a/include/mupdf/fitz/path.h b/include/mupdf/fitz/path.h
index 22b81c6e..a4a74aea 100644
--- a/include/mupdf/fitz/path.h
+++ b/include/mupdf/fitz/path.h
@@ -82,11 +82,11 @@ fz_rect *fz_bound_path(fz_context *ctx, fz_path *path, const fz_stroke_state *st
fz_rect *fz_adjust_rect_for_stroke(fz_rect *r, const fz_stroke_state *stroke, const fz_matrix *ctm);
fz_stroke_state *fz_new_stroke_state(fz_context *ctx);
-fz_stroke_state *fz_new_stroke_state_with_len(fz_context *ctx, int len);
+fz_stroke_state *fz_new_stroke_state_with_dash_len(fz_context *ctx, int len);
fz_stroke_state *fz_keep_stroke_state(fz_context *ctx, fz_stroke_state *stroke);
void fz_drop_stroke_state(fz_context *ctx, fz_stroke_state *stroke);
fz_stroke_state *fz_unshare_stroke_state(fz_context *ctx, fz_stroke_state *shared);
-fz_stroke_state *fz_unshare_stroke_state_with_len(fz_context *ctx, fz_stroke_state *shared, int len);
+fz_stroke_state *fz_unshare_stroke_state_with_dash_len(fz_context *ctx, fz_stroke_state *shared, int len);
#ifndef NDEBUG
void fz_print_path(fz_context *ctx, FILE *out, fz_path *, int indent);
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);