]> git.saurik.com Git - wxWidgets.git/commitdiff
reverted Robert's over-optimisation, correct fix coming soon
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 25 Nov 2004 08:32:49 +0000 (08:32 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 25 Nov 2004 08:32:49 +0000 (08:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/html/htmlcell.cpp
src/html/htmprint.cpp
src/html/m_hline.cpp
src/html/m_image.cpp
src/html/m_list.cpp

index 8064a7c5437ae7940252b0333f04e928c9200c1f..5ea2d4b802b1a2aa721d619f9e28e1473e36317c 100644 (file)
@@ -376,7 +376,7 @@ static void SwitchSelState(wxDC& dc, wxHtmlRenderingInfo& info,
 
 
 void wxHtmlWordCell::Draw(wxDC& dc, int x, int y,
-                          int WXUNUSED(view_y1), int view_y2,
+                          int WXUNUSED(view_y1), int WXUNUSED(view_y2),
                           wxHtmlRenderingInfo& info)
 {
 #if 0 // useful for debugging
@@ -384,8 +384,6 @@ void wxHtmlWordCell::Draw(wxDC& dc, int x, int y,
     dc.DrawRectangle(x+m_PosX,y+m_PosY,m_Width /* VZ: +1? */ ,m_Height);
 #endif
 
-    if (y+m_PosY+m_Height > view_y2) return;
-
     bool drawSelectionAfterCell = false;
 
     if ( info.GetState().GetSelectionState() == wxHTML_SEL_CHANGING )
index c094e0ead32e7c84ee97049a37e27748dc1b3072..ca4787987899588ebe0eaf82c1b6ad80491278ce 100644 (file)
@@ -124,17 +124,18 @@ int wxHtmlDCRenderer::Render(int x, int y, int from, int dont_render, int to, in
     if(to < hght)
         hght = to;
 
-
     if (!dont_render)
     {
         wxHtmlRenderingInfo rinfo;
         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;
index 76a8db4aec291caa275078ff57bb30291eeca3f7..d629fda7bc613b961d78dd3bd1f438546647e7b7 100644 (file)
@@ -56,11 +56,9 @@ class wxHtmlLineCell : public wxHtmlCell
 
 
 void wxHtmlLineCell::Draw(wxDC& dc, int x, int y,
-                          int WXUNUSED(view_y1), int view_y2,
+                          int WXUNUSED(view_y1), int WXUNUSED(view_y2),
                           wxHtmlRenderingInfo& WXUNUSED(info))
 {
-    if (y+m_PosY+m_Height > view_y2) return;
-    
     wxBrush mybrush(wxT("GREY"), (m_HasShading) ? wxTRANSPARENT : wxSOLID);
     wxPen mypen(wxT("GREY"), 1, wxSOLID);
     dc.SetBrush(mybrush);
index b42f7780be950f69609920769af096e4fed06d4a..a850abcf374482c91b214557f1542d58e3265c35 100644 (file)
@@ -539,11 +539,9 @@ wxHtmlImageCell::~wxHtmlImageCell()
 
 
 void wxHtmlImageCell::Draw(wxDC& dc, int x, int y,
-                           int WXUNUSED(view_y1), int view_y2,
+                           int WXUNUSED(view_y1), int WXUNUSED(view_y2),
                            wxHtmlRenderingInfo& WXUNUSED(info))
 {
-    if (y+m_PosY+m_Height > view_y2) return;
-    
     if ( m_showFrame )
     {
         dc.SetBrush(*wxTRANSPARENT_BRUSH);
index 9669682592a46aafa1d58f9b7c096076b0dc6856..e441b0ebd116fb1e603204e5f52f1f933dd6a95c 100644 (file)
@@ -59,11 +59,9 @@ wxHtmlListmarkCell::wxHtmlListmarkCell(wxDC* dc, const wxColour& clr) : wxHtmlCe
 
 
 void wxHtmlListmarkCell::Draw(wxDC& dc, int x, int y,
-                              int WXUNUSED(view_y1), int view_y2,
+                              int WXUNUSED(view_y1), int WXUNUSED(view_y2),
                               wxHtmlRenderingInfo& WXUNUSED(info))
 {
-    if (y+m_PosY+m_Height > view_y2) return;
-
     dc.SetBrush(m_Brush);
     dc.DrawEllipse(x + m_PosX + m_Width / 3, y + m_PosY + m_Height / 3,
                    (m_Width / 3), (m_Width / 3));