diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2011-03-12 17:46:11 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2011-03-12 17:46:11 +0000 |
commit | 74f108ee4dc5b915dfc8de0f88485245831ea7a9 (patch) | |
tree | 68ede86e02c521b1c10b31cd2c5b57fd8984256d /desktop | |
parent | bdb05fa08abe1781827a3c095f26d7d0ac4dbe82 (diff) | |
download | netsurf-74f108ee4dc5b915dfc8de0f88485245831ea7a9.tar.gz netsurf-74f108ee4dc5b915dfc8de0f88485245831ea7a9.tar.bz2 |
Saturated maths in css fixed point
svn path=/trunk/netsurf/; revision=11975
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/print.c | 9 | ||||
-rw-r--r-- | desktop/textarea.c | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/desktop/print.c b/desktop/print.c index 995f1bf73..fbc0c4790 100644 --- a/desktop/print.c +++ b/desktop/print.c @@ -68,11 +68,12 @@ bool print_basic_run(hlcache_handle *content, assert(content != NULL && printer != NULL && settings != NULL); - if (!print_set_up(content, printer, settings, NULL)) - ret = false; + if (print_set_up(content, printer, settings, NULL)) + return false; - while (ret && (done_height < content_get_height(printed_content)) ) + while (ret && (done_height < content_get_height(printed_content)) ) { ret = print_draw_next_page(printer, settings); + } print_cleanup(content, printer, settings); @@ -95,7 +96,7 @@ bool print_set_up(hlcache_handle *content, { printed_content = print_init(content, settings); - if (!printed_content) + if (printed_content == NULL) return false; print_apply_settings(printed_content, settings); diff --git a/desktop/textarea.c b/desktop/textarea.c index 5450dde64..2feef0e6c 100644 --- a/desktop/textarea.c +++ b/desktop/textarea.c @@ -178,9 +178,7 @@ struct text_area *textarea_create(int width, int height, ret->fstyle = *style; - ret->line_height = FIXTOINT(FDIVI((FMUL(FLTTOFIX(1.2), - FMULI(nscss_screen_dpi, - (style->size / FONT_SIZE_SCALE)))), 72)); + ret->line_height = FIXTOINT(FDIV((FMUL(FLTTOFIX(1.2), FMUL(nscss_screen_dpi, INTTOFIX((style->size / FONT_SIZE_SCALE))))), F_72)); ret->caret_pos.line = ret->caret_pos.char_off = 0; ret->caret_x = MARGIN_LEFT; |