X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2a0eb92258a60c9e96978db7351c4ef86c8f0136..f28538c5f6721a8d07445f88fc55818927d9b6b3:/src/html/htmprint.cpp diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index 85614f0928..f7072abf46 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -107,12 +107,13 @@ void wxHtmlDCRenderer::SetHtmlText(const wxString& html, const wxString& basepat int wxHtmlDCRenderer::Render(int x, int y, int from, int dont_render) { - int pbreak; + int pbreak, hght; if (m_Cells == NULL || m_DC == NULL) return 0; pbreak = (int)(from * m_Scale + m_Height); while (m_Cells -> AdjustPagebreak(&pbreak)) {} + hght = pbreak - (int)(from * m_Scale); if (!dont_render) { int w, h; @@ -122,10 +123,10 @@ int wxHtmlDCRenderer::Render(int x, int y, int from, int dont_render) m_DC -> SetBrush(*wxWHITE_BRUSH); - m_DC -> SetClippingRegion(x * m_Scale, y * m_Scale, m_Width, m_Height); + m_DC -> SetClippingRegion(x * m_Scale, y * m_Scale, m_Width, hght); m_Cells -> Draw(*m_DC, x * m_Scale, (y - from) * m_Scale, - y * m_Scale, pbreak + (y - from) * m_Scale); + y * m_Scale, pbreak + (y /*- from*/) * m_Scale); m_DC -> DestroyClippingRegion(); }