From 4ac725a3b3cc829e39c91173aaeb61132d4a231c Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 27 Nov 2004 22:40:05 +0000 Subject: [PATCH] renamed Render's argument to not obfuscate its meaning git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/html/htmprint.h | 3 ++- src/html/htmprint.cpp | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/wx/html/htmprint.h b/include/wx/html/htmprint.h index 5b6ab89c87..df90a47dce 100644 --- a/include/wx/html/htmprint.h +++ b/include/wx/html/htmprint.h @@ -81,7 +81,8 @@ public: // set the same pagebreak twice. // // CAUTION! Render() changes DC's user scale and does NOT restore it! - int Render(int x, int y, int from = 0, int dont_render = FALSE, int to = INT_MAX, + int Render(int x, int y, int from = 0, int dont_render = FALSE, + int maxHeight = INT_MAX, int *known_pagebreaks = NULL, int number_of_pages = 0); // returns total height of the html document diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index ca47879878..ce67a52c69 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -112,7 +112,9 @@ void wxHtmlDCRenderer::SetStandardFonts(int size, } -int wxHtmlDCRenderer::Render(int x, int y, int from, int dont_render, int to, int *known_pagebreaks, int number_of_pages) +int wxHtmlDCRenderer::Render(int x, int y, int from, int dont_render, + int maxHeight, + int *known_pagebreaks, int number_of_pages) { int pbreak, hght; @@ -121,8 +123,8 @@ int wxHtmlDCRenderer::Render(int x, int y, int from, int dont_render, int to, in pbreak = (int)(from + m_Height); while (m_Cells->AdjustPagebreak(&pbreak, known_pagebreaks, number_of_pages)) {} hght = pbreak - from; - if(to < hght) - hght = to; + if (maxHeight < hght) + hght = maxHeight; if (!dont_render) { -- 2.45.2