Unexport pdf_scale variable (use pdf_set_scale to set it) and initialize it to DEFAULT_EXPORT_SCALE.

svn path=/trunk/netsurf/; revision=6350
This commit is contained in:
John Tytgat 2009-02-02 00:22:44 +00:00
parent 15e8ba0270
commit 57124b7f92
3 changed files with 4 additions and 9 deletions

View File

@ -503,7 +503,6 @@ void ami_menupick(ULONG code,struct gui_window_2 *gwin,struct MenuItem *item)
strlcpy(&fname,savereq->fr_Drawer,1024);
AddPart(fname,savereq->fr_File,1024);
ami_update_pointer(gwin->win,GUI_POINTER_WAIT);
pdf_set_scale(DEFAULT_EXPORT_SCALE);
save_as_pdf(gwin->bw->current_content,fname);
SetComment(fname,gwin->bw->current_content->url);
ami_update_pointer(gwin->win,GUI_POINTER_DEFAULT);

View File

@ -31,6 +31,5 @@ bool haru_nsfont_apply_style(const struct css_style *style,
HPDF_Font *font);
extern const struct font_functions haru_nsfont;
extern float pdf_scale;
#endif

View File

@ -124,7 +124,7 @@ const struct printer pdf_printer = {
pdf_end
};
float pdf_scale;
static float pdf_scale = DEFAULT_EXPORT_SCALE;
static char *owner_pass;
static char *user_pass;
@ -288,12 +288,7 @@ bool pdf_plot_text(int x, int y, const struct css_style *style,
else
size = css_len2pt(&style->font_size.value.length, style);
/*this can be removed when export options get added for riscos*/
#ifdef riscos
size *= DEFAULT_EXPORT_SCALE;
#else
size *= pdf_scale;
#endif
if (size <= 0)
return true;
@ -812,7 +807,9 @@ void pdf_plot_grid(int x_dist, int y_dist, unsigned int colour)
}
#endif
/**used to synch the text scale with the scale for the whole content*/
/**
* Sync the text scale with the scale for the whole content
*/
void pdf_set_scale(float s)
{
pdf_scale = s;