diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2010-04-07 17:29:40 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2010-04-07 17:29:40 +0000 |
commit | 2975e1df84b011548a337e88214a9e7aaaa6d6ce (patch) | |
tree | baff0b1859a571be9398fa759fbc1f85ce2e1c49 | |
parent | 95b859c2eb3223e2732d6ebd75f11906bdeda3ba (diff) | |
download | netsurf-2975e1df84b011548a337e88214a9e7aaaa6d6ce.tar.gz netsurf-2975e1df84b011548a337e88214a9e7aaaa6d6ce.tar.bz2 |
Fix for new cache.
svn path=/trunk/netsurf/; revision=10280
-rw-r--r-- | riscos/save_draw.c | 13 | ||||
-rw-r--r-- | riscos/save_pdf.c | 7 |
2 files changed, 11 insertions, 9 deletions
diff --git a/riscos/save_draw.c b/riscos/save_draw.c index 1a75ee5f0..a142c63da 100644 --- a/riscos/save_draw.c +++ b/riscos/save_draw.c @@ -30,6 +30,7 @@ #include "oslib/osfile.h" #include "pencil.h" #include "content/content.h" +#include "content/hlcache.h" #include "desktop/plotters.h" #include "riscos/bitmap.h" #include "riscos/gui.h" @@ -79,12 +80,12 @@ static int ro_save_draw_height; /** * Export a content as a DrawFile. * - * \param c content to export + * \param h content to export * \param path path to save DrawFile as * \return true on success, false on error and error reported */ -bool save_as_draw(struct content *c, const char *path) +bool save_as_draw(hlcache_handle *h, const char *path) { pencil_code code; char *drawfile_buffer; @@ -97,12 +98,12 @@ bool save_as_draw(struct content *c, const char *path) return false; } - ro_save_draw_width = c->width; - ro_save_draw_height = c->height; + ro_save_draw_width = content_get_width(h); + ro_save_draw_height = content_get_height(h); plot = ro_save_draw_plotters; - if (!content_redraw(c, 0, -c->height, - c->width, c->height, + if (!content_redraw(h, 0, -ro_save_draw_height, + ro_save_draw_width, ro_save_draw_height, INT_MIN, INT_MIN, INT_MAX, INT_MAX, 1, 0xFFFFFF)) diff --git a/riscos/save_pdf.c b/riscos/save_pdf.c index 4d553637b..3d6395629 100644 --- a/riscos/save_pdf.c +++ b/riscos/save_pdf.c @@ -26,6 +26,7 @@ #include <stdbool.h> #include "oslib/osfile.h" #include "content/content.h" +#include "content/hlcache.h" #include "desktop/print.h" #include "desktop/save_pdf/font_haru.h" #include "desktop/save_pdf/pdf_plotters.h" @@ -36,11 +37,11 @@ /** * Export a content as a PDF file. * - * \param c content to export + * \param h content to export * \param path path to save PDF as * \return true on success, false on error and error reported */ -bool save_as_pdf(struct content *c, const char *path) +bool save_as_pdf(hlcache_handle *h, const char *path) { struct print_settings *psettings; @@ -48,7 +49,7 @@ bool save_as_pdf(struct content *c, const char *path) if (psettings == NULL) return false; - if (!print_basic_run(c, &pdf_printer, psettings)) + if (!print_basic_run(h, &pdf_printer, psettings)) return false; xosfile_set_type(path, 0xadf); |