// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "htmprint.h"
-#endif
-
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
}
-void wxHtmlDCRenderer::SetFonts(wxString normal_face, wxString fixed_face,
+void wxHtmlDCRenderer::SetFonts(const wxString& normal_face, const wxString& fixed_face,
const int *sizes)
{
m_Parser->SetFonts(normal_face, fixed_face, sizes);
}
-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;
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)
{
wxDefaultHtmlRenderingStyle rstyle;
rinfo.SetStyle(&rstyle);
m_DC->SetBrush(*wxWHITE_BRUSH);
+ m_DC->SetClippingRegion(x, y, m_Width, hght);
m_Cells->Draw(*m_DC,
x, (y - from),
- y, y + hght,
+ y, pbreak + (y /*- from*/),
rinfo);
+ m_DC->DestroyClippingRegion();
}
if (pbreak < m_Cells->GetHeight()) return pbreak;
-void wxHtmlPrintout::SetFonts(wxString normal_face, wxString fixed_face,
+void wxHtmlPrintout::SetFonts(const wxString& normal_face, const wxString& fixed_face,
const int *sizes)
{
m_Renderer->SetFonts(normal_face, fixed_face, sizes);
}
-void wxHtmlEasyPrinting::SetFonts(wxString normal_face, wxString fixed_face,
+void wxHtmlEasyPrinting::SetFonts(const wxString& normal_face, const wxString& fixed_face,
const int *sizes)
{
m_fontMode = FontMode_Explicit;