Use wxDCClipper in wxHtmlDCRenderer code
Use wxDCClipper instead of manually calling DestroyClippingRegion(). This is simpler and safer and also potentially more correct as wxDCClipper restores the previous clipping region, if any, unlike the old code -- even though this probably doesn't matter here as the printing DC seems unlikely to be clipped.
This commit is contained in:
@@ -161,12 +161,11 @@ int wxHtmlDCRenderer::Render(int x, int y,
|
||||
wxDefaultHtmlRenderingStyle rstyle;
|
||||
rinfo.SetStyle(&rstyle);
|
||||
m_DC->SetBrush(*wxWHITE_BRUSH);
|
||||
m_DC->SetClippingRegion(x, y, m_Width, hght);
|
||||
wxDCClipper clip(*m_DC, x, y, m_Width, hght);
|
||||
m_Cells->Draw(*m_DC,
|
||||
x, (y - from),
|
||||
y, y + hght,
|
||||
rinfo);
|
||||
m_DC->DestroyClippingRegion();
|
||||
}
|
||||
|
||||
if (pbreak < m_Cells->GetHeight()) return pbreak;
|
||||
|
Reference in New Issue
Block a user