summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-02-26 16:31:06 +0100
committerTor Andersson <tor.andersson@artifex.com>2018-02-27 17:47:54 +0100
commit9f8e0724789744d81c5de0138e65284a9560e707 (patch)
treeac4237044423e8ac6bf60a33a879862134c3f8bb /include
parent8ebca3d5481961f56b5754ab4cfa9544f58c5b0b (diff)
downloadmupdf-9f8e0724789744d81c5de0138e65284a9560e707.tar.xz
Remove pdf_xobject wrapper struct.
Just use the pdf_obj directly. Revise ap_iteration and split annot->dirty into separate flags. One flag for needs_new_ap, and one for has_new_ap (to be used by clients who may have cached a rendered annotation).
Diffstat (limited to 'include')
-rw-r--r--include/mupdf/pdf/annot.h8
-rw-r--r--include/mupdf/pdf/interpret.h4
-rw-r--r--include/mupdf/pdf/resource.h28
3 files changed, 13 insertions, 27 deletions
diff --git a/include/mupdf/pdf/annot.h b/include/mupdf/pdf/annot.h
index 13111aab..2dd47f27 100644
--- a/include/mupdf/pdf/annot.h
+++ b/include/mupdf/pdf/annot.h
@@ -107,10 +107,10 @@ struct pdf_annot_s
pdf_page *page;
pdf_obj *obj;
- pdf_xobject *ap;
+ pdf_obj *ap;
- int ap_iteration;
- int dirty;
+ int needs_new_ap;
+ int has_new_ap;
pdf_annot *next;
};
@@ -245,7 +245,5 @@ void pdf_set_free_text_details(fz_context *ctx, pdf_annot *annot, fz_point *pos,
pdf_annot *pdf_new_annot(fz_context *ctx, pdf_page *page);
void pdf_dirty_annot(fz_context *ctx, pdf_annot *annot);
-void pdf_clean_annot(fz_context *ctx, pdf_annot *annot);
-int pdf_annot_is_dirty(fz_context *ctx, pdf_annot *annot);
#endif
diff --git a/include/mupdf/pdf/interpret.h b/include/mupdf/pdf/interpret.h
index cbe1d665..4854caac 100644
--- a/include/mupdf/pdf/interpret.h
+++ b/include/mupdf/pdf/interpret.h
@@ -30,7 +30,7 @@ struct pdf_processor_s
void (*op_gs_BM)(fz_context *ctx, pdf_processor *proc, const char *blendmode);
void (*op_gs_ca)(fz_context *ctx, pdf_processor *proc, float alpha);
void (*op_gs_CA)(fz_context *ctx, pdf_processor *proc, float alpha);
- void (*op_gs_SMask)(fz_context *ctx, pdf_processor *proc, pdf_xobject *smask, pdf_obj *page_resources, float *bc, int luminosity);
+ void (*op_gs_SMask)(fz_context *ctx, pdf_processor *proc, pdf_obj *smask, pdf_obj *page_resources, float *bc, int luminosity);
void (*op_gs_end)(fz_context *ctx, pdf_processor *proc);
/* special graphics state */
@@ -113,7 +113,7 @@ struct pdf_processor_s
void (*op_BI)(fz_context *ctx, pdf_processor *proc, fz_image *image);
void (*op_sh)(fz_context *ctx, pdf_processor *proc, const char *name, fz_shade *shade);
void (*op_Do_image)(fz_context *ctx, pdf_processor *proc, const char *name, fz_image *image);
- void (*op_Do_form)(fz_context *ctx, pdf_processor *proc, const char *name, pdf_xobject *form, pdf_obj *page_resources);
+ void (*op_Do_form)(fz_context *ctx, pdf_processor *proc, const char *name, pdf_obj *form, pdf_obj *page_resources);
/* marked content */
void (*op_MP)(fz_context *ctx, pdf_processor *proc, const char *tag);
diff --git a/include/mupdf/pdf/resource.h b/include/mupdf/pdf/resource.h
index 5650a12a..85a9f786 100644
--- a/include/mupdf/pdf/resource.h
+++ b/include/mupdf/pdf/resource.h
@@ -76,29 +76,17 @@ void pdf_drop_pattern(fz_context *ctx, pdf_pattern *pat);
* XObject
*/
-typedef struct pdf_xobject_s pdf_xobject;
-
-struct pdf_xobject_s
-{
- fz_storable storable;
- pdf_obj *obj;
- int iteration;
-};
-
-pdf_xobject *pdf_load_xobject(fz_context *ctx, pdf_document *doc, pdf_obj *obj);
pdf_obj *pdf_new_xobject(fz_context *ctx, pdf_document *doc, const fz_rect *bbox, const fz_matrix *mat);
-pdf_xobject *pdf_keep_xobject(fz_context *ctx, pdf_xobject *xobj);
-void pdf_drop_xobject(fz_context *ctx, pdf_xobject *xobj);
-void pdf_update_xobject_contents(fz_context *ctx, pdf_document *doc, pdf_xobject *form, fz_buffer *buffer);
+void pdf_update_xobject_contents(fz_context *ctx, pdf_document *doc, pdf_obj *form, fz_buffer *buffer);
void pdf_update_appearance(fz_context *ctx, pdf_document *doc, pdf_annot *annot);
-pdf_obj *pdf_xobject_resources(fz_context *ctx, pdf_xobject *xobj);
-fz_rect *pdf_xobject_bbox(fz_context *ctx, pdf_xobject *xobj, fz_rect *bbox);
-fz_matrix *pdf_xobject_matrix(fz_context *ctx, pdf_xobject *xobj, fz_matrix *matrix);
-int pdf_xobject_isolated(fz_context *ctx, pdf_xobject *xobj);
-int pdf_xobject_knockout(fz_context *ctx, pdf_xobject *xobj);
-int pdf_xobject_transparency(fz_context *ctx, pdf_xobject *xobj);
-fz_colorspace *pdf_xobject_colorspace(fz_context *ctx, pdf_xobject *xobj);
+pdf_obj *pdf_xobject_resources(fz_context *ctx, pdf_obj *xobj);
+fz_rect *pdf_xobject_bbox(fz_context *ctx, pdf_obj *xobj, fz_rect *bbox);
+fz_matrix *pdf_xobject_matrix(fz_context *ctx, pdf_obj *xobj, fz_matrix *matrix);
+int pdf_xobject_isolated(fz_context *ctx, pdf_obj *xobj);
+int pdf_xobject_knockout(fz_context *ctx, pdf_obj *xobj);
+int pdf_xobject_transparency(fz_context *ctx, pdf_obj *xobj);
+fz_colorspace *pdf_xobject_colorspace(fz_context *ctx, pdf_obj *xobj);
#endif