mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-03-12 18:13:10 +03:00
Fix for new cache.
svn path=/trunk/netsurf/; revision=10280
This commit is contained in:
parent
95b859c2eb
commit
2975e1df84
@ -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))
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user