From ec939b6813b7dbe0d8e0c54fb729100f4e0c7896 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 6 Nov 1999 00:13:28 +0000 Subject: [PATCH] fixed some clipping related bugs in wxHTML priting git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/html/htmprint.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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(); } -- 2.45.2