summaryrefslogtreecommitdiff
path: root/fitz
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-06-30 02:29:48 +0200
committerTor Andersson <tor@ghostscript.com>2010-06-30 02:29:48 +0200
commit1a789da086a7816384495f2737b89bd3b7700f10 (patch)
tree72b2eaa8b603109ec6bb2c8ae2bdbca7e384a895 /fitz
parent9b36c63c9c25c7f6c7c99ff30385a29bc51703c5 (diff)
downloadmupdf-1a789da086a7816384495f2737b89bd3b7700f10.tar.xz
Refactor and clean up shading code a bit.
Diffstat (limited to 'fitz')
-rw-r--r--fitz/fitz_draw.h3
-rw-r--r--fitz/res_shade.c4
2 files changed, 3 insertions, 4 deletions
diff --git a/fitz/fitz_draw.h b/fitz/fitz_draw.h
index 0e13a831..00152b47 100644
--- a/fitz/fitz_draw.h
+++ b/fitz/fitz_draw.h
@@ -386,10 +386,9 @@ struct fz_shade_s
int meshlen;
int meshcap;
- float *mesh; /* [x y t] or [x y c1 ... cn] * 3 * meshlen */
+ float *mesh; /* [x y t] or [x y c1 ... cn] */
};
-
fz_shade *fz_keepshade(fz_shade *shade);
void fz_dropshade(fz_shade *shade);
void fz_debugshade(fz_shade *shade);
diff --git a/fitz/res_shade.c b/fitz/res_shade.c
index 61b2f3a4..2ddd6275 100644
--- a/fitz/res_shade.c
+++ b/fitz/res_shade.c
@@ -61,12 +61,12 @@ fz_debugshade(fz_shade *shade)
else
n = 2 + shade->cs->n;
- printf("\ttriangles: %d\n", shade->meshlen);
+ printf("\tvertices: %d\n", shade->meshlen);
vertex = shade->mesh;
triangle = 0;
i = 0;
- while (i < shade->meshlen * 3)
+ while (i < shade->meshlen)
{
printf("\t%d:(%g, %g): ", triangle, vertex[0], vertex[1]);