Mercurial > hg > syntilista
changeset 167:c54ad71c1205
Apply (kludgey) adjustment scales for printed page to avoid overflow ..
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 19 Sep 2017 13:14:51 +0300 |
parents | 9511e2f250be |
children | 7def6e0f02f0 |
files | src/printing.cpp |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/printing.cpp Tue Sep 19 13:01:29 2017 +0300 +++ b/src/printing.cpp Tue Sep 19 13:14:51 2017 +0300 @@ -13,6 +13,9 @@ #define APP_PRINT_WIDTH 1000 #define APP_PRINT_HEIGHT 1300 +#define APP_PRINT_WSCALE 1.01f +#define APP_PRINT_HSCALE 1.00f + void SyntilistaMainWindow::on_button_Print_clicked() { @@ -137,8 +140,8 @@ pt->save(); pt->scale( - pt->device()->width() / (float) APP_PRINT_WIDTH, - pt->device()->height() / (float) APP_PRINT_HEIGHT); + pt->device()->width() / ((float) APP_PRINT_WIDTH * APP_PRINT_WSCALE), + pt->device()->height() /((float) APP_PRINT_HEIGHT * APP_PRINT_HSCALE)); QFont font1; font1.setFamily("Arial");