diff options
Diffstat (limited to 'include/mupdf/fitz')
-rw-r--r-- | include/mupdf/fitz/annotation.h | 2 | ||||
-rw-r--r-- | include/mupdf/fitz/display-list.h | 4 | ||||
-rw-r--r-- | include/mupdf/fitz/document.h | 6 | ||||
-rw-r--r-- | include/mupdf/fitz/font.h | 4 | ||||
-rw-r--r-- | include/mupdf/fitz/geometry.h | 110 | ||||
-rw-r--r-- | include/mupdf/fitz/glyph.h | 4 | ||||
-rw-r--r-- | include/mupdf/fitz/link.h | 2 | ||||
-rw-r--r-- | include/mupdf/fitz/path.h | 6 | ||||
-rw-r--r-- | include/mupdf/fitz/pixmap.h | 16 | ||||
-rw-r--r-- | include/mupdf/fitz/shade.h | 4 | ||||
-rw-r--r-- | include/mupdf/fitz/structured-text.h | 2 | ||||
-rw-r--r-- | include/mupdf/fitz/text.h | 4 |
12 files changed, 69 insertions, 95 deletions
diff --git a/include/mupdf/fitz/annotation.h b/include/mupdf/fitz/annotation.h index 8f7385f6..e7efb4cd 100644 --- a/include/mupdf/fitz/annotation.h +++ b/include/mupdf/fitz/annotation.h @@ -38,6 +38,6 @@ fz_annot *fz_next_annot(fz_context *ctx, fz_annot *annot); /* fz_bound_annot: Return the bounding rectangle of the annotation. */ -fz_rect *fz_bound_annot(fz_context *ctx, fz_annot *annot, fz_rect *rect); +fz_rect fz_bound_annot(fz_context *ctx, fz_annot *annot); #endif diff --git a/include/mupdf/fitz/display-list.h b/include/mupdf/fitz/display-list.h index b6a23e43..02bb4e4a 100644 --- a/include/mupdf/fitz/display-list.h +++ b/include/mupdf/fitz/display-list.h @@ -32,7 +32,7 @@ typedef struct fz_display_list_s fz_display_list; mediabox: Bounds of the page (in points) represented by the display list. */ -fz_display_list *fz_new_display_list(fz_context *ctx, const fz_rect *mediabox); +fz_display_list *fz_new_display_list(fz_context *ctx, fz_rect mediabox); /* fz_new_list_device: Create a rendering device for a display list. @@ -89,7 +89,7 @@ void fz_drop_display_list(fz_context *ctx, fz_display_list *list); /* fz_bound_display_list: Return the bounding box of the page recorded in a display list. */ -fz_rect *fz_bound_display_list(fz_context *ctx, fz_display_list *list, fz_rect *bounds); +fz_rect fz_bound_display_list(fz_context *ctx, fz_display_list *list); /* Create a new image from a display list. diff --git a/include/mupdf/fitz/document.h b/include/mupdf/fitz/document.h index 95e59632..9920a054 100644 --- a/include/mupdf/fitz/document.h +++ b/include/mupdf/fitz/document.h @@ -127,7 +127,7 @@ typedef void (fz_page_drop_page_fn)(fz_context *ctx, fz_page *page); bounding box of a page. See fz_bound_page for more information. */ -typedef fz_rect *(fz_page_bound_page_fn)(fz_context *ctx, fz_page *page, fz_rect *); +typedef fz_rect (fz_page_bound_page_fn)(fz_context *ctx, fz_page *page); /* fz_page_run_page_contents_fn: Type for a function to run the @@ -186,7 +186,7 @@ typedef int (fz_page_uses_overprint_fn)(fz_context *ctx, fz_page *page); typedef void (fz_annot_drop_fn)(fz_context *ctx, fz_annot *annot); typedef fz_annot *(fz_annot_next_fn)(fz_context *ctx, fz_annot *annot); -typedef fz_rect *(fz_annot_bound_fn)(fz_context *ctx, fz_annot *annot, fz_rect *rect); +typedef fz_rect (fz_annot_bound_fn)(fz_context *ctx, fz_annot *annot); typedef void (fz_annot_run_fn)(fz_context *ctx, fz_annot *annot, fz_device *dev, const fz_matrix *transform, fz_cookie *cookie); /* @@ -469,7 +469,7 @@ fz_page *fz_new_page_of_size(fz_context *ctx, int size); fz_bound_page: Determine the size of a page at 72 dpi. */ -fz_rect *fz_bound_page(fz_context *ctx, fz_page *page, fz_rect *rect); +fz_rect fz_bound_page(fz_context *ctx, fz_page *page); /* fz_run_page: Run a page through a device. diff --git a/include/mupdf/fitz/font.h b/include/mupdf/fitz/font.h index aa6d4dd5..13c2bf65 100644 --- a/include/mupdf/fitz/font.h +++ b/include/mupdf/fitz/font.h @@ -372,7 +372,7 @@ fz_font *fz_load_fallback_font(fz_context *ctx, int script, int language, int se Returns a new font handle, or throws exception on allocation failure. */ -fz_font *fz_new_type3_font(fz_context *ctx, const char *name, const fz_matrix *matrix); +fz_font *fz_new_type3_font(fz_context *ctx, const char *name, fz_matrix matrix); /* fz_new_font_from_memory: Create a new font from a font @@ -468,7 +468,7 @@ void fz_set_font_bbox(fz_context *ctx, fz_font *font, float xmin, float ymin, fl Returns r, after filling it in with the bounds of the given glyph. */ -fz_rect *fz_bound_glyph(fz_context *ctx, fz_font *font, int gid, const fz_matrix *trm, fz_rect *r); +fz_rect fz_bound_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix trm); /* fz_glyph_cacheable: Determine if a given glyph in a font diff --git a/include/mupdf/fitz/geometry.h b/include/mupdf/fitz/geometry.h index 9127c34f..f44b4f6c 100644 --- a/include/mupdf/fitz/geometry.h +++ b/include/mupdf/fitz/geometry.h @@ -163,22 +163,6 @@ static inline fz_rect fz_make_rect(float x0, float y0, float x1, float y1) } /* - fz_rect_min: get the minimum point from a rectangle as a fz_point. -*/ -static inline fz_point *fz_rect_min(fz_rect *f) -{ - return (fz_point *)&f->x0; -} - -/* - fz_rect_max: get the maximum point from a rectangle as a fz_point. -*/ -static inline fz_point *fz_rect_max(fz_rect *f) -{ - return (fz_point *)&f->x1; -} - -/* fz_irect is a rectangle using integers instead of floats. It's used in the draw device and for pixmap dimensions. @@ -226,16 +210,14 @@ extern const fz_irect fz_infinite_irect; An empty rectangle is defined as one whose area is zero. */ -static inline int -fz_is_empty_rect(const fz_rect *r) +static inline int fz_is_empty_rect(fz_rect r) { - return ((r)->x0 == (r)->x1 || (r)->y0 == (r)->y1); + return (r.x0 == r.x1 || r.y0 == r.y1); } -static inline int -fz_is_empty_irect(const fz_irect *r) +static inline int fz_is_empty_irect(fz_irect r) { - return ((r)->x0 == (r)->x1 || (r)->y0 == (r)->y1); + return (r.x0 == r.x1 || r.y0 == r.y1); } /* @@ -244,10 +226,9 @@ fz_is_empty_irect(const fz_irect *r) An infinite rectangle is defined as one where either of the two relationships between corner coordinates are not true. */ -static inline int -fz_is_infinite_rect(const fz_rect *r) +static inline int fz_is_infinite_rect(fz_rect r) { - return ((r)->x0 > (r)->x1 || (r)->y0 > (r)->y1); + return (r.x0 > r.x1 || r.y0 > r.y1); } /* @@ -257,10 +238,9 @@ fz_is_infinite_rect(const fz_rect *r) An infinite rectangle is defined as one where either of the two relationships between corner coordinates are not true. */ -static inline int -fz_is_infinite_irect(const fz_irect *r) +static inline int fz_is_infinite_irect(fz_irect r) { - return ((r)->x0 > (r)->x1 || (r)->y0 > (r)->y1); + return (r.x0 > r.x1 || r.y0 > r.y1); } /* @@ -293,12 +273,6 @@ static inline fz_matrix fz_make_matrix(float a, float b, float c, float d, float return m; } -static inline fz_matrix *fz_copy_matrix(fz_matrix *FZ_RESTRICT m, const fz_matrix *FZ_RESTRICT s) -{ - *m = *s; - return m; -} - /* fz_concat: Multiply two matrices. @@ -307,7 +281,7 @@ static inline fz_matrix *fz_copy_matrix(fz_matrix *FZ_RESTRICT m, const fz_matri Returns result. */ -fz_matrix *fz_concat(fz_matrix *result, const fz_matrix *left, const fz_matrix *right); +fz_matrix fz_concat(fz_matrix left, fz_matrix right); /* fz_scale: Create a scaling matrix. @@ -322,7 +296,7 @@ fz_matrix *fz_concat(fz_matrix *result, const fz_matrix *left, const fz_matrix * Returns m. */ -fz_matrix *fz_scale(fz_matrix *m, float sx, float sy); +fz_matrix fz_scale(float sx, float sy); /* fz_pre_scale: Scale a matrix by premultiplication. @@ -335,7 +309,7 @@ fz_matrix *fz_scale(fz_matrix *m, float sx, float sy); Returns m (updated). */ -fz_matrix *fz_pre_scale(fz_matrix *m, float sx, float sy); +fz_matrix fz_pre_scale(fz_matrix m, float sx, float sy); /* fz_post_scale: Scale a matrix by postmultiplication. @@ -348,7 +322,7 @@ fz_matrix *fz_pre_scale(fz_matrix *m, float sx, float sy); Returns m (updated). */ -fz_matrix *fz_post_scale(fz_matrix *m, float sx, float sy); +fz_matrix fz_post_scale(fz_matrix m, float sx, float sy); /* fz_shear: Create a shearing matrix. @@ -362,7 +336,7 @@ fz_matrix *fz_post_scale(fz_matrix *m, float sx, float sy); Returns m. */ -fz_matrix *fz_shear(fz_matrix *m, float sx, float sy); +fz_matrix fz_shear(float sx, float sy); /* fz_pre_shear: Premultiply a matrix with a shearing matrix. @@ -376,7 +350,7 @@ fz_matrix *fz_shear(fz_matrix *m, float sx, float sy); Returns m (updated). */ -fz_matrix *fz_pre_shear(fz_matrix *m, float sx, float sy); +fz_matrix fz_pre_shear(fz_matrix m, float sx, float sy); /* fz_rotate: Create a rotation matrix. @@ -391,7 +365,7 @@ fz_matrix *fz_pre_shear(fz_matrix *m, float sx, float sy); Returns m. */ -fz_matrix *fz_rotate(fz_matrix *m, float degrees); +fz_matrix fz_rotate(float degrees); /* fz_pre_rotate: Rotate a transformation by premultiplying. @@ -406,7 +380,7 @@ fz_matrix *fz_rotate(fz_matrix *m, float degrees); Returns m (updated). */ -fz_matrix *fz_pre_rotate(fz_matrix *m, float degrees); +fz_matrix fz_pre_rotate(fz_matrix m, float degrees); /* fz_translate: Create a translation matrix. @@ -421,7 +395,7 @@ fz_matrix *fz_pre_rotate(fz_matrix *m, float degrees); Returns m. */ -fz_matrix *fz_translate(fz_matrix *m, float tx, float ty); +fz_matrix fz_translate(float tx, float ty); /* fz_pre_translate: Translate a matrix by premultiplication. @@ -434,7 +408,7 @@ fz_matrix *fz_translate(fz_matrix *m, float tx, float ty); Returns m. */ -fz_matrix *fz_pre_translate(fz_matrix *m, float tx, float ty); +fz_matrix fz_pre_translate(fz_matrix m, float tx, float ty); /* fz_invert_matrix: Create an inverse matrix. @@ -447,7 +421,7 @@ fz_matrix *fz_pre_translate(fz_matrix *m, float tx, float ty); Returns inverse. */ -fz_matrix *fz_invert_matrix(fz_matrix *inverse, const fz_matrix *matrix); +fz_matrix fz_invert_matrix(fz_matrix matrix); /* fz_try_invert_matrix: Attempt to create an inverse matrix. @@ -459,7 +433,7 @@ fz_matrix *fz_invert_matrix(fz_matrix *inverse, const fz_matrix *matrix); Returns 1 if matrix is degenerate (singular), or 0 otherwise. */ - int fz_try_invert_matrix(fz_matrix *inverse, const fz_matrix *matrix); +int fz_try_invert_matrix(fz_matrix *inv, fz_matrix src); /* fz_is_rectilinear: Check if a transformation is rectilinear. @@ -469,12 +443,12 @@ fz_matrix *fz_invert_matrix(fz_matrix *inverse, const fz_matrix *matrix); is used to make sure that axis-aligned rectangles before the transformation are still axis-aligned rectangles afterwards. */ -int fz_is_rectilinear(const fz_matrix *m); +int fz_is_rectilinear(fz_matrix m); /* fz_matrix_expansion: Calculate average scaling factor of matrix. */ -float fz_matrix_expansion(const fz_matrix *m); /* sumatrapdf */ +float fz_matrix_expansion(fz_matrix m); /* fz_intersect_rect: Compute intersection of two rectangles. @@ -487,7 +461,7 @@ float fz_matrix_expansion(const fz_matrix *m); /* sumatrapdf */ Should both rectangles be infinite, then the intersection is also infinite. */ -fz_rect *fz_intersect_rect(fz_rect *FZ_RESTRICT a, const fz_rect *FZ_RESTRICT b); +fz_rect fz_intersect_rect(fz_rect a, fz_rect b); /* fz_intersect_irect: Compute intersection of two bounding boxes. @@ -495,7 +469,7 @@ fz_rect *fz_intersect_rect(fz_rect *FZ_RESTRICT a, const fz_rect *FZ_RESTRICT b) Similar to fz_intersect_rect but operates on two bounding boxes instead of two rectangles. */ -fz_irect *fz_intersect_irect(fz_irect *FZ_RESTRICT a, const fz_irect *FZ_RESTRICT b); +fz_irect fz_intersect_irect(fz_irect a, fz_irect b); /* fz_union_rect: Compute union of two rectangles. @@ -507,7 +481,7 @@ fz_irect *fz_intersect_irect(fz_irect *FZ_RESTRICT a, const fz_irect *FZ_RESTRIC non-empty rectangle. Should both rectangles be empty, then the union is also empty. */ -fz_rect *fz_union_rect(fz_rect *FZ_RESTRICT a, const fz_rect *FZ_RESTRICT b); +fz_rect fz_union_rect(fz_rect a, fz_rect b); /* fz_irect_from_rect: Convert a rect into the minimal bounding box @@ -525,7 +499,7 @@ fz_rect *fz_union_rect(fz_rect *FZ_RESTRICT a, const fz_rect *FZ_RESTRICT b); Returns bbox (updated). */ -fz_irect *fz_irect_from_rect(fz_irect *FZ_RESTRICT bbox, const fz_rect *FZ_RESTRICT rect); +fz_irect fz_irect_from_rect(fz_rect rect); /* fz_round_rect: Round rectangle coordinates. @@ -541,7 +515,7 @@ fz_irect *fz_irect_from_rect(fz_irect *FZ_RESTRICT bbox, const fz_rect *FZ_RESTR allows for a small amount of rounding error when calculating the bbox. */ -fz_irect *fz_round_rect(fz_irect *FZ_RESTRICT bbox, const fz_rect *FZ_RESTRICT rect); +fz_irect fz_round_rect(fz_rect rect); /* fz_rect_from_irect: Convert a bbox into a rect. @@ -555,13 +529,13 @@ fz_irect *fz_round_rect(fz_irect *FZ_RESTRICT bbox, const fz_rect *FZ_RESTRICT r Returns rect (updated). */ -fz_rect *fz_rect_from_irect(fz_rect *FZ_RESTRICT rect, const fz_irect *FZ_RESTRICT bbox); +fz_rect fz_rect_from_irect(fz_irect bbox); /* fz_expand_rect: Expand a bbox by a given amount in all directions. */ -fz_rect *fz_expand_rect(fz_rect *b, float expand); -fz_irect *fz_expand_irect(fz_irect *a, int expand); +fz_rect fz_expand_rect(fz_rect b, float expand); +fz_irect fz_expand_irect(fz_irect a, int expand); /* fz_include_point_in_rect: Expand a bbox to include a given point. @@ -569,22 +543,22 @@ fz_irect *fz_expand_irect(fz_irect *a, int expand); rectangle must first be set to be the empty rectangle at one of the points before including the others. */ -fz_rect *fz_include_point_in_rect(fz_rect *r, const fz_point *p); +fz_rect fz_include_point_in_rect(fz_rect r, fz_point p); /* fz_translate_irect: Translate bounding box. Translate a bbox by a given x and y offset. Allows for overflow. */ -fz_rect *fz_translate_rect(fz_rect *a, float xoff, float yoff); -fz_irect *fz_translate_irect(fz_irect *a, int xoff, int yoff); +fz_rect fz_translate_rect(fz_rect a, float xoff, float yoff); +fz_irect fz_translate_irect(fz_irect a, int xoff, int yoff); /* fz_contains_rect: Test rectangle inclusion. Return true if a entirely contains b. */ -int fz_contains_rect(const fz_rect *a, const fz_rect *b); +int fz_contains_rect(fz_rect a, fz_rect b); /* fz_transform_point: Apply a transformation to a point. @@ -597,8 +571,8 @@ int fz_contains_rect(const fz_rect *a, const fz_rect *b); Returns transform (unchanged). */ -fz_point *fz_transform_point(fz_point *FZ_RESTRICT point, const fz_matrix *FZ_RESTRICT transform); -fz_point *fz_transform_point_xy(fz_point *FZ_RESTRICT point, const fz_matrix *FZ_RESTRICT transform, float x, float y); +fz_point fz_transform_point(fz_point point, fz_matrix m); +fz_point fz_transform_point_xy(float x, float y, fz_matrix m); /* fz_transform_vector: Apply a transformation to a vector. @@ -609,7 +583,7 @@ fz_point *fz_transform_point_xy(fz_point *FZ_RESTRICT point, const fz_matrix *FZ vector: Pointer to vector to update. */ -fz_point *fz_transform_vector(fz_point *FZ_RESTRICT vector, const fz_matrix *FZ_RESTRICT transform); +fz_point fz_transform_vector(fz_point vector, fz_matrix m); /* fz_transform_rect: Apply a transform to a rectangle. @@ -626,16 +600,16 @@ fz_point *fz_transform_vector(fz_point *FZ_RESTRICT vector, const fz_matrix *FZ_ fz_empty_rect and fz_infinite_rect, may be used but are returned unchanged as expected. */ -fz_rect *fz_transform_rect(fz_rect *FZ_RESTRICT rect, const fz_matrix *FZ_RESTRICT transform); +fz_rect fz_transform_rect(fz_rect rect, fz_matrix m); /* fz_normalize_vector: Normalize a vector to length one. */ -void fz_normalize_vector(fz_point *p); +fz_point fz_normalize_vector(fz_point p); -void fz_gridfit_matrix(int as_tiled, fz_matrix *m); +fz_matrix fz_gridfit_matrix(int as_tiled, fz_matrix m); -float fz_matrix_max_expansion(const fz_matrix *m); +float fz_matrix_max_expansion(fz_matrix m); typedef struct fz_quad_s fz_quad; struct fz_quad_s @@ -644,7 +618,7 @@ struct fz_quad_s }; fz_rect fz_rect_from_quad(fz_quad q); -fz_quad *fz_transform_quad(fz_quad *q, const fz_matrix *m); +fz_quad fz_transform_quad(fz_quad q, fz_matrix m); int fz_is_point_inside_rect(fz_point p, fz_rect r); int fz_is_point_inside_irect(int x, int y, fz_irect r); diff --git a/include/mupdf/fitz/glyph.h b/include/mupdf/fitz/glyph.h index 4b2bfdbb..1f697e5e 100644 --- a/include/mupdf/fitz/glyph.h +++ b/include/mupdf/fitz/glyph.h @@ -16,7 +16,7 @@ typedef struct fz_glyph_s fz_glyph; /* fz_glyph_bbox: Return the bounding box for a glyph. */ -fz_irect *fz_glyph_bbox(fz_context *ctx, fz_glyph *glyph, fz_irect *bbox); +fz_irect fz_glyph_bbox(fz_context *ctx, fz_glyph *glyph); /* fz_glyph_width: Return the width of the glyph in pixels. @@ -120,7 +120,7 @@ struct fz_glyph_s unsigned char data[1]; }; -fz_irect *fz_glyph_bbox_no_ctx(fz_glyph *src, fz_irect *bbox); +fz_irect fz_glyph_bbox_no_ctx(fz_glyph *src); static inline size_t fz_glyph_size(fz_context *ctx, fz_glyph *glyph) diff --git a/include/mupdf/fitz/link.h b/include/mupdf/fitz/link.h index 3aa5116f..af1461ce 100644 --- a/include/mupdf/fitz/link.h +++ b/include/mupdf/fitz/link.h @@ -39,7 +39,7 @@ struct fz_link_s char *uri; }; -fz_link *fz_new_link(fz_context *ctx, const fz_rect *bbox, void *doc, const char *uri); +fz_link *fz_new_link(fz_context *ctx, fz_rect bbox, void *doc, const char *uri); fz_link *fz_keep_link(fz_context *ctx, fz_link *link); /* diff --git a/include/mupdf/fitz/path.h b/include/mupdf/fitz/path.h index 47e80841..aac7232d 100644 --- a/include/mupdf/fitz/path.h +++ b/include/mupdf/fitz/path.h @@ -323,7 +323,7 @@ void fz_closepath(fz_context *ctx, fz_path *path); Throws exceptions if the path is packed, or on failure to allocate. */ -void fz_transform_path(fz_context *ctx, fz_path *path, const fz_matrix *transform); +void fz_transform_path(fz_context *ctx, fz_path *path, fz_matrix transform); /* fz_bound_path: Return a bounding rectangle for a path. @@ -341,8 +341,8 @@ void fz_transform_path(fz_context *ctx, fz_path *path, const fz_matrix *transfor Returns r, updated to contain the bounding rectangle. */ -fz_rect *fz_bound_path(fz_context *ctx, const fz_path *path, const fz_stroke_state *stroke, const fz_matrix *ctm, fz_rect *r); -fz_rect *fz_adjust_rect_for_stroke(fz_context *ctx, fz_rect *r, const fz_stroke_state *stroke, const fz_matrix *ctm); +fz_rect fz_bound_path(fz_context *ctx, const fz_path *path, const fz_stroke_state *stroke, fz_matrix ctm); +fz_rect fz_adjust_rect_for_stroke(fz_context *ctx, fz_rect rect, const fz_stroke_state *stroke, fz_matrix ctm); extern const fz_stroke_state fz_default_stroke_state; diff --git a/include/mupdf/fitz/pixmap.h b/include/mupdf/fitz/pixmap.h index 050f5aba..18e01790 100644 --- a/include/mupdf/fitz/pixmap.h +++ b/include/mupdf/fitz/pixmap.h @@ -21,7 +21,7 @@ typedef struct fz_overprint_s fz_overprint; /* fz_pixmap_bbox: Return the bounding box for a pixmap. */ -fz_irect *fz_pixmap_bbox(fz_context *ctx, const fz_pixmap *pix, fz_irect *bbox); +fz_irect fz_pixmap_bbox(fz_context *ctx, const fz_pixmap *pix); /* fz_pixmap_width: Return the width of the pixmap in pixels. @@ -83,7 +83,7 @@ fz_pixmap *fz_new_pixmap(fz_context *ctx, fz_colorspace *cs, int w, int h, fz_se Returns a pointer to the new pixmap. Throws exception on failure to allocate. */ -fz_pixmap *fz_new_pixmap_with_bbox(fz_context *ctx, fz_colorspace *colorspace, const fz_irect *bbox, fz_separations *seps, int alpha); +fz_pixmap *fz_new_pixmap_with_bbox(fz_context *ctx, fz_colorspace *colorspace, fz_irect bbox, fz_separations *seps, int alpha); /* fz_new_pixmap_with_data: Create a new pixmap, with its origin at @@ -133,7 +133,7 @@ fz_pixmap *fz_new_pixmap_with_data(fz_context *ctx, fz_colorspace *colorspace, i Returns a pointer to the new pixmap. Throws exception on failure to allocate. */ -fz_pixmap *fz_new_pixmap_with_bbox_and_data(fz_context *ctx, fz_colorspace *colorspace, const fz_irect *rect, fz_separations *seps, int alpha, unsigned char *samples); +fz_pixmap *fz_new_pixmap_with_bbox_and_data(fz_context *ctx, fz_colorspace *colorspace, fz_irect rect, fz_separations *seps, int alpha, unsigned char *samples); /* fz_new_pixmap_from_pixmap: Create a new pixmap that represents @@ -244,7 +244,7 @@ void fz_fill_pixmap_with_color(fz_context *ctx, fz_pixmap *pix, fz_colorspace *c r: the rectangle. */ -void fz_clear_pixmap_rect_with_value(fz_context *ctx, fz_pixmap *pix, int value, const fz_irect *r); +void fz_clear_pixmap_rect_with_value(fz_context *ctx, fz_pixmap *pix, int value, fz_irect r); /* fz_clear_pixmap_with_value: Sets all components (including alpha) of @@ -274,7 +274,7 @@ void fz_tint_pixmap(fz_context *ctx, fz_pixmap *pix, int r, int g, int b); pixmap. All components of all pixels in the rectangle are inverted (except alpha, which is unchanged). */ -void fz_invert_pixmap_rect(fz_context *ctx, fz_pixmap *image, const fz_irect *rect); +void fz_invert_pixmap_rect(fz_context *ctx, fz_pixmap *image, fz_irect rect); /* fz_gamma_pixmap: Apply gamma correction to a pixmap. All components @@ -367,12 +367,12 @@ enum void fz_drop_pixmap_imp(fz_context *ctx, fz_storable *pix); -void fz_copy_pixmap_rect(fz_context *ctx, fz_pixmap *dest, fz_pixmap *src, const fz_irect *r, const fz_default_colorspaces *default_cs); +void fz_copy_pixmap_rect(fz_context *ctx, fz_pixmap *dest, fz_pixmap *src, fz_irect r, const fz_default_colorspaces *default_cs); void fz_premultiply_pixmap(fz_context *ctx, fz_pixmap *pix); fz_pixmap *fz_alpha_from_gray(fz_context *ctx, fz_pixmap *gray); size_t fz_pixmap_size(fz_context *ctx, fz_pixmap *pix); -fz_pixmap *fz_scale_pixmap(fz_context *ctx, fz_pixmap *src, float x, float y, float w, float h, fz_irect *clip); +fz_pixmap *fz_scale_pixmap(fz_context *ctx, fz_pixmap *src, float x, float y, float w, float h, const fz_irect *clip); typedef struct fz_scale_cache_s fz_scale_cache; @@ -382,7 +382,7 @@ fz_pixmap *fz_scale_pixmap_cached(fz_context *ctx, const fz_pixmap *src, float x void fz_subsample_pixmap(fz_context *ctx, fz_pixmap *tile, int factor); -fz_irect *fz_pixmap_bbox_no_ctx(const fz_pixmap *src, fz_irect *bbox); +fz_irect fz_pixmap_bbox_no_ctx(const fz_pixmap *src); void fz_decode_tile(fz_context *ctx, fz_pixmap *pix, const float *decode); void fz_decode_indexed_tile(fz_context *ctx, fz_pixmap *pix, const float *decode, int maxval); diff --git a/include/mupdf/fitz/shade.h b/include/mupdf/fitz/shade.h index 24cb4cb2..7b821a34 100644 --- a/include/mupdf/fitz/shade.h +++ b/include/mupdf/fitz/shade.h @@ -115,7 +115,7 @@ void fz_drop_shade_imp(fz_context *ctx, fz_storable *shade); Returns r, updated to contain the bounds for the shading. */ -fz_rect *fz_bound_shade(fz_context *ctx, fz_shade *shade, const fz_matrix *ctm, fz_rect *r); +fz_rect fz_bound_shade(fz_context *ctx, fz_shade *shade, fz_matrix ctm); /* fz_paint_shade: Render a shade to a given pixmap. @@ -194,7 +194,7 @@ typedef void (fz_shade_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_shade(fz_context *ctx, fz_shade *shade, const fz_matrix *ctm, +void fz_process_shade(fz_context *ctx, fz_shade *shade, fz_matrix ctm, fz_shade_prepare_fn *prepare, fz_shade_process_fn *process, void *process_arg); diff --git a/include/mupdf/fitz/structured-text.h b/include/mupdf/fitz/structured-text.h index 2adfa73a..67dde472 100644 --- a/include/mupdf/fitz/structured-text.h +++ b/include/mupdf/fitz/structured-text.h @@ -111,7 +111,7 @@ extern const char *fz_stext_options_usage; mediabox: optional mediabox information. */ -fz_stext_page *fz_new_stext_page(fz_context *ctx, const fz_rect *mediabox); +fz_stext_page *fz_new_stext_page(fz_context *ctx, fz_rect mediabox); void fz_drop_stext_page(fz_context *ctx, fz_stext_page *page); /* diff --git a/include/mupdf/fitz/text.h b/include/mupdf/fitz/text.h index d2b9d21f..cce357ae 100644 --- a/include/mupdf/fitz/text.h +++ b/include/mupdf/fitz/text.h @@ -113,7 +113,7 @@ void fz_drop_text(fz_context *ctx, const fz_text *text); Throws exception on failure to allocate. */ -void fz_show_glyph(fz_context *ctx, fz_text *text, fz_font *font, const fz_matrix *trm, int glyph, int unicode, int wmode, int bidi_level, fz_bidi_direction markup_dir, fz_text_language language); +void fz_show_glyph(fz_context *ctx, fz_text *text, fz_font *font, fz_matrix trm, int glyph, int unicode, int wmode, int bidi_level, fz_bidi_direction markup_dir, fz_text_language language); /* fz_show_string: Add a UTF8 string to a text object. @@ -156,7 +156,7 @@ void fz_show_string(fz_context *ctx, fz_text *text, fz_font *font, fz_matrix *tr Returns a pointer to r, which is updated to contain the bounding box for the text object. */ -fz_rect *fz_bound_text(fz_context *ctx, const fz_text *text, const fz_stroke_state *stroke, const fz_matrix *ctm, fz_rect *r); +fz_rect fz_bound_text(fz_context *ctx, const fz_text *text, const fz_stroke_state *stroke, fz_matrix ctm); /* Convert ISO 639 (639-{1,2,3,5}) language specification |