diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-07-23 23:05:34 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-07-23 23:05:34 +0000 |
commit | ddeadd1c02880367ad786b113d352a519f45ec73 (patch) | |
tree | 00b8b46ee1a3fc84e5492c2183dfaa8192d261f9 /desktop/save_pdf/pdf_plotters.c | |
parent | b20949a35025b23da1bf0ac6003f4575eb94281d (diff) | |
download | netsurf-ddeadd1c02880367ad786b113d352a519f45ec73.tar.gz netsurf-ddeadd1c02880367ad786b113d352a519f45ec73.tar.bz2 |
Merge LibCSS port to trunk.
svn path=/trunk/netsurf/; revision=8752
Diffstat (limited to 'desktop/save_pdf/pdf_plotters.c')
-rw-r--r-- | desktop/save_pdf/pdf_plotters.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/desktop/save_pdf/pdf_plotters.c b/desktop/save_pdf/pdf_plotters.c index a29db2415..8dbe43971 100644 --- a/desktop/save_pdf/pdf_plotters.c +++ b/desktop/save_pdf/pdf_plotters.c @@ -146,7 +146,7 @@ bool pdf_plot_rectangle(int x0, int y0, int x1, int y1, const plot_style_t *psty { DashPattern_e dash; #ifdef PDF_DEBUG - LOG(("%d %d %d %d %f %X", x0, y0, x1, y1, page_height - y0, style->fill_colour)); + LOG(("%d %d %d %d %f %X", x0, y0, x1, y1, page_height - y0, pstyle->fill_colour)); #endif if (pstyle->fill_type != PLOT_OP_TYPE_NONE) { @@ -353,7 +353,7 @@ bool pdf_plot_disc(int x, int y, int radius, const plot_style_t *style) bool pdf_plot_arc(int x, int y, int radius, int angle1, int angle2, const plot_style_t *style) { #ifdef PDF_DEBUG - LOG(("%d %d %d %d %d %X", x, y, radius, angle1, angle2, c)); + LOG(("%d %d %d %d %d %X", x, y, radius, angle1, angle2, style->stroke_colour)); #endif /* FIXME: line width 1 is ok ? */ @@ -381,8 +381,8 @@ bool pdf_plot_bitmap_tile(int x, int y, int width, int height, HPDF_REAL max_width, max_height; #ifdef PDF_DEBUG - LOG(("%d %d %d %d %p 0x%x %p", x, y, width, height, - bitmap, bg, content)); + LOG(("%d %d %d %d %p 0x%x", x, y, width, height, + bitmap, bg)); #endif if (width == 0 || height == 0) return true; @@ -662,10 +662,12 @@ bool pdf_begin(struct print_settings *print_settings) settings = print_settings; - page_width = settings->page_width - settings->margins[MARGINLEFT] - - settings->margins[MARGINRIGHT]; + page_width = settings->page_width - + FIXTOFLT(FSUB(settings->margins[MARGINLEFT], + settings->margins[MARGINRIGHT])); - page_height = settings->page_height - settings->margins[MARGINTOP]; + page_height = settings->page_height - + FIXTOFLT(settings->margins[MARGINTOP]); #ifndef PDF_DEBUG @@ -708,7 +710,8 @@ bool pdf_next_page(void) HPDF_Page_SetWidth (pdf_page, settings->page_width); HPDF_Page_SetHeight(pdf_page, settings->page_height); - HPDF_Page_Concat(pdf_page, 1, 0, 0, 1, settings->margins[MARGINLEFT], 0); + HPDF_Page_Concat(pdf_page, 1, 0, 0, 1, + FIXTOFLT(settings->margins[MARGINLEFT]), 0); pdfw_gs_save(pdf_page); |