summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/fitz/shade.h32
-rw-r--r--include/mupdf/rsrc.h5
2 files changed, 22 insertions, 15 deletions
diff --git a/include/fitz/shade.h b/include/fitz/shade.h
index c8a47ffd..6687d42c 100644
--- a/include/fitz/shade.h
+++ b/include/fitz/shade.h
@@ -3,25 +3,27 @@ typedef struct fz_shade_s fz_shade;
struct fz_shade_s
{
int refs;
- fz_colorspace *cs;
- fz_obj *background;
- fz_rect *bbox;
- int antialias;
-
- int type;
- fz_obj *coords;
- fz_obj *domain;
- fz_matrix matrix;
- fz_matrix matrix2;
- void *function;
- fz_obj *extend;
-
- /* ... */
+
+ fz_rect bbox; /* can be fz_infiniterect */
+ fz_colorspace *colorspace;
+
+ /* used by build.c -- not used in drawshade.c */
+ fz_matrix matrix; /* matrix from pattern dict */
+ int usebackground; /* background color for fills but not 'sh' */
+ float background[FZ_MAXCOLORS];
+
+ int usefunction;
+ float function[512][FZ_MAXCOLORS];
+
+ int meshlen;
+ int meshcap;
+ float *mesh; /* [x y t] or [x y c1 ... cn] * 3 * meshlen */
};
+
fz_shade *fz_keepshade(fz_shade *shade);
void fz_dropshade(fz_shade *shade);
fz_rect fz_boundshade(fz_shade *shade, fz_matrix ctm);
-fz_error *fz_rendershade(fz_shade *shade, fz_matrix ctm, fz_colorspace *dsts, fz_pixmap *dstp, int over);
+fz_error *fz_rendershade(fz_shade *shade, fz_matrix ctm, fz_colorspace *dsts, fz_pixmap *dstp);
diff --git a/include/mupdf/rsrc.h b/include/mupdf/rsrc.h
index e840ccec..82a201c9 100644
--- a/include/mupdf/rsrc.h
+++ b/include/mupdf/rsrc.h
@@ -80,6 +80,11 @@ fz_error *pdf_loadpattern(pdf_pattern **patp, pdf_xref *xref, fz_obj *obj, fz_ob
pdf_pattern *pdf_keeppattern(pdf_pattern *pat);
void pdf_droppattern(pdf_pattern *pat);
+/*
+ * Shading
+ */
+
+void pdf_setmeshvalue(float *mesh, int i, float x, float y, float t);
fz_error *pdf_loadshade(fz_shade **shadep, pdf_xref *xref, fz_obj *obj, fz_obj *ref);
/*