From 97d00440c043b712a2d16134e3b52850c7b36d47 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 10 Nov 2011 01:52:40 +0100 Subject: Add XPS outline parsing and move outline data struct to fz_outline. --- fitz/fitz.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'fitz/fitz.h') diff --git a/fitz/fitz.h b/fitz/fitz.h index dff6b8d4..5529384d 100644 --- a/fitz/fitz.h +++ b/fitz/fitz.h @@ -1063,6 +1063,24 @@ void fz_free_display_list(fz_display_list *list); fz_device *fz_new_list_device(fz_display_list *list); void fz_execute_display_list(fz_display_list *list, fz_device *dev, fz_matrix ctm, fz_bbox area); +/* + * Document interface. + */ + +typedef struct fz_outline_s fz_outline; + +struct fz_outline_s +{ + char *title; + int page; + fz_outline *next; + fz_outline *down; +}; + +void fz_debug_outline_xml(fz_outline *outline, int level); +void fz_debug_outline(fz_outline *outline, int level); +void fz_free_outline(fz_outline *outline); + /* * Plotting functions. */ -- cgit v1.2.3 From 5c4ff53fb89b5068bc901fd5909be9e5d2d0cb0b Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 8 Nov 2011 17:46:48 +0000 Subject: Grid fitting tweaks. Extract the grid fitting code from the scaling code and the affine image drawing code into it's own separate function. This reduces code duplication. It also allows us to make better allowance for rounding errors. Add a voodoo offset in the draw_affine.c code for painting interpolated images. This gives us the best possible match between all the different combinations of scaled/unscaled and interpolated/uninterpolated images. --- fitz/fitz.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fitz/fitz.h') diff --git a/fitz/fitz.h b/fitz/fitz.h index 5529384d..a1235c05 100644 --- a/fitz/fitz.h +++ b/fitz/fitz.h @@ -273,6 +273,8 @@ fz_point fz_transform_vector(fz_matrix m, fz_point p); fz_rect fz_transform_rect(fz_matrix m, fz_rect r); fz_bbox fz_transform_bbox(fz_matrix m, fz_bbox b); +void fz_gridfit_matrix(fz_matrix *m); + /* * Basic crypto functions. * Independent of the rest of fitz. @@ -629,7 +631,6 @@ void fz_invert_pixmap(fz_pixmap *pix); void fz_gamma_pixmap(fz_pixmap *pix, float gamma); fz_pixmap *fz_scale_pixmap(fz_pixmap *src, float x, float y, float w, float h); -fz_pixmap *fz_scale_pixmap_gridfit(fz_pixmap *src, float x, float y, float w, float h, int gridfit); fz_error fz_write_pnm(fz_pixmap *pixmap, char *filename); fz_error fz_write_pam(fz_pixmap *pixmap, char *filename, int savealpha); -- cgit v1.2.3