summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/shade.h
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2016-09-28 21:12:55 +0100
committerRobin Watts <robin.watts@artifex.com>2016-10-07 16:56:46 +0100
commite173e02141bc77563e94db4523c78c31471af4be (patch)
tree14bbeb3e5a0a12320378a42abdd532a87f007ee5 /include/mupdf/fitz/shade.h
parentc571af66f9fb57bd2468c960e03649baa0c28919 (diff)
downloadmupdf-e173e02141bc77563e94db4523c78c31471af4be.tar.xz
Rename fz_process_mesh to fz_process_shade.
Better name as not all shadings are meshes.
Diffstat (limited to 'include/mupdf/fitz/shade.h')
-rw-r--r--include/mupdf/fitz/shade.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/include/mupdf/fitz/shade.h b/include/mupdf/fitz/shade.h
index 59ff7b97..5358cde2 100644
--- a/include/mupdf/fitz/shade.h
+++ b/include/mupdf/fitz/shade.h
@@ -136,32 +136,34 @@ struct fz_vertex_s
};
/*
- fz_mesh_prepare_fn: Callback function type for use with
- fz_process_mesh.
+ fz_shade_prepare_fn: Callback function type for use with
+ fz_process_shade.
- arg: Opaque pointer from fz_process_mesh caller.
+ arg: Opaque pointer from fz_process_shade caller.
v: Pointer to a fz_vertex structure to populate.
c: Pointer to an array of floats to use to populate v.
*/
-typedef void (fz_mesh_prepare_fn)(fz_context *ctx, void *arg, fz_vertex *v, const float *c);
+typedef void (fz_shade_prepare_fn)(fz_context *ctx, void *arg, fz_vertex *v, const float *c);
/*
- fz_mesh_process_fn: Callback function type for use with
- fz_process_mesh.
+ fz_shade_process_fn: Callback function type for use with
+ fz_process_shade.
- arg: Opaque pointer from fz_process_mesh caller.
+ arg: Opaque pointer from fz_process_shade caller.
av, bv, cv: Pointers to a fz_vertex structure describing
the corner locations and colors of a triangle to be
filled.
*/
-typedef void (fz_mesh_process_fn)(fz_context *ctx, void *arg, fz_vertex *av, fz_vertex *bv, fz_vertex *cv);
+typedef void (fz_shade_process_fn)(fz_context *ctx, void *arg, fz_vertex *av, fz_vertex *bv, fz_vertex *cv);
/*
- fz_process_mesh: Process a mesh, using supplied callback
- functions.
+ fz_process_shade: Process a shade, using supplied callback
+ functions. This decomposes the shading to a mesh (even ones
+ that are not natively meshes, such as linear or radial
+ shadings), and processes triangles from those meshes.
shade: The shade to process.
@@ -178,8 +180,8 @@ typedef void (fz_mesh_process_fn)(fz_context *ctx, void *arg, fz_vertex *av, fz_
process_arg: An opaque argument passed through from caller
to callback functions.
*/
-void fz_process_mesh(fz_context *ctx, fz_shade *shade, const fz_matrix *ctm,
- fz_mesh_prepare_fn *prepare, fz_mesh_process_fn *process, void *process_arg);
+void fz_process_shade(fz_context *ctx, fz_shade *shade, const fz_matrix *ctm,
+ fz_shade_prepare_fn *prepare, fz_shade_process_fn *process, void *process_arg);
/*
fz_print_shade: Output a textual representation of