Implemented Clear in wxSVGFileDC.
Draw a rectangle with the background colour and a transparent pen. Closes #15788.
This commit is contained in:
@@ -81,10 +81,7 @@ public:
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Clear() wxOVERRIDE
|
virtual void Clear() wxOVERRIDE;
|
||||||
{
|
|
||||||
wxFAIL_MSG(wxT("wxSVGFILEDC::Clear() Call not implemented \nNot sensible for an output file?"));
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void DestroyClippingRegion() wxOVERRIDE;
|
virtual void DestroyClippingRegion() wxOVERRIDE;
|
||||||
|
|
||||||
|
@@ -60,7 +60,7 @@ public:
|
|||||||
void EndPage();
|
void EndPage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This makes no sense in wxSVGFileDC and does nothing.
|
Draws a rectangle the size of the SVG using the wxDC::SetBackground() brush.
|
||||||
*/
|
*/
|
||||||
void Clear();
|
void Clear();
|
||||||
|
|
||||||
|
@@ -305,6 +305,17 @@ wxSize wxSVGFileDCImpl::GetPPI() const
|
|||||||
return wxSize( wxRound(m_dpi), wxRound(m_dpi) );
|
return wxSize( wxRound(m_dpi), wxRound(m_dpi) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxSVGFileDCImpl::Clear()
|
||||||
|
{
|
||||||
|
{
|
||||||
|
wxDCBrushChanger setBackground(*GetOwner(), m_backgroundBrush);
|
||||||
|
wxDCPenChanger setTransp(*GetOwner(), *wxTRANSPARENT_PEN);
|
||||||
|
DoDrawRectangle(0, 0, m_width, m_height);
|
||||||
|
}
|
||||||
|
|
||||||
|
NewGraphicsIfNeeded();
|
||||||
|
}
|
||||||
|
|
||||||
void wxSVGFileDCImpl::DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
|
void wxSVGFileDCImpl::DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
|
||||||
{
|
{
|
||||||
NewGraphicsIfNeeded();
|
NewGraphicsIfNeeded();
|
||||||
|
Reference in New Issue
Block a user