diff --git a/include/reprint.cpp b/include/reprint.cpp index 228052d57..7f4a4e6a2 100755 --- a/include/reprint.cpp +++ b/include/reprint.cpp @@ -132,7 +132,7 @@ void advanced_draw_paragraph(TWindow& win, const TString_array& para, const RCT& int ky10 = (leading + ascent + descent) * 10; // Aggiusta l'altezza di una riga standard, se necessario - if (ky10 < default_10row_height && ky10 > 80*default_10row_height/100) + if (ky10 < default_10row_height && ky10 > 75*default_10row_height/100) ky10 = default_10row_height; const int rct_height = rct.bottom - rct.top; @@ -798,22 +798,28 @@ TWindow_printer::~TWindow_printer() // Writing a page /////////////////////////////////////////////////////////// -// Converte da coordinate logiche (1/100 caratteri) a coordinate fisiche +// Converte da coordinate logiche (1/100 caratteri) a coordinate di stampa TPoint TBook::log2dev(const TPoint& ptlog) const { TPoint ptdev; ptdev.x = (ptlog.x * _phr) / (100 * cpi()); ptdev.y = (ptlog.y * _pvr) / (100 * lpi()); - return ptdev; + return ptdev; +} + +PNT TBook::log2pix(const TPoint& ptlog) const +{ + TPoint ptdev = log2dev(ptlog); + return _printwin->log2dev(ptdev.x, ptdev.y); } int TBook::compute_text_frame(const TString& tmp, const TReport_font& font, TRectangle& rect, TString_array& para) const { // Calcola la larghezza massima e l'altezza di 10 righe const TRectangle rect_riga(0,0,rect.width(),1000); - const TPoint size = log2dev(rect_riga.size()); - const int max_row_width = size.x; - const int def_10row_height = size.y; + const PNT size = log2pix(rect_riga.size()); + const int max_row_width = size.h; + const int def_10row_height = size.v; WINDOW w = _printwin->win(); CHECK(w == PRINTER_WIN, "Finestra di stampa non valida"); diff --git a/include/reprint.h b/include/reprint.h index cf40d18ce..ae306d164 100755 --- a/include/reprint.h +++ b/include/reprint.h @@ -33,7 +33,8 @@ protected: virtual void define_frame(const TRectangle& rect); virtual bool init(); - TPoint log2dev(const TPoint& ptlog) const; + TPoint log2dev(const TPoint& ptlog) const; + PNT log2pix(const TPoint& ptlog) const; bool is_pdf() const { return _pdf_file.full(); } public: