From: Václav Slavík Date: Sat, 6 Nov 1999 00:13:28 +0000 (+0000) Subject: fixed some clipping related bugs in wxHTML priting X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ec939b6813b7dbe0d8e0c54fb729100f4e0c7896 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 --- 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(); }