- if (m_DC == NULL) return;
-
- if (m_Cells != NULL) delete m_Cells;
-
- m_FS -> ChangePathTo(basepath, isdir);
- m_DC -> SetUserScale(1.0, 1.0);
- m_Cells = (wxHtmlContainerCell*) m_Parser -> Parse(html);
- m_Cells -> SetIndent(0, wxHTML_INDENT_ALL, wxHTML_UNITS_PIXELS);
- m_Cells -> Layout(m_Width);
-}
-
-
-
-int wxHtmlDCRenderer::Render(int x, int y, int from, int dont_render)
-{
- int pbreak;
-
- if (m_Cells == NULL || m_DC == NULL) return 0;
-
- pbreak = (int)(from * m_Scale + m_Height);
- while (m_Cells -> AdjustPagebreak(&pbreak)) {}
-
- if (!dont_render) {
- int w, h;
- m_DC -> GetSize(&w, &h);
- float overallScale = (float)(w/(float)m_MaxWidth) / m_Scale;
- m_DC -> SetUserScale(overallScale, overallScale);
-
- m_DC -> SetBrush(*wxWHITE_BRUSH);
-
- m_DC -> SetClippingRegion(x * m_Scale, y * m_Scale, m_Width, m_Height);
- m_Cells -> Draw(*m_DC,
- x * m_Scale, (y - from) * m_Scale,
- y * m_Scale, pbreak + (y - from) * m_Scale);
- m_DC -> DestroyClippingRegion();
- }
-
- if (pbreak < m_Cells -> GetHeight()) return (int)(pbreak / m_Scale);
- else return GetTotalHeight();
-}