Remove duplicated method to destroy clipping region in wxPaintDCImpl (wxGTK)
Destroying clipping region is since 106b850593
("Fix wxCairoContext::ResetClip() for wxGTK", 2022-10-28) fully handled in
parent wxGCDCImpl::DestroyClippingRegion() calling wxCairoContext::ResetClip()
(including re-establishing clip for paint update area) so there is no need
to implement overriding method in wxPaintDCImpl.
Closes #23046.
This commit is contained in:
parent
08104d819e
commit
e7a2786352
2 changed files with 0 additions and 20 deletions
|
|
@ -70,13 +70,8 @@ public:
|
|||
|
||||
class wxPaintDCImpl: public wxGTKCairoDCImpl
|
||||
{
|
||||
typedef wxGTKCairoDCImpl BaseType;
|
||||
public:
|
||||
wxPaintDCImpl(wxPaintDC* owner, wxWindow* window);
|
||||
virtual void DestroyClippingRegion() override;
|
||||
|
||||
private:
|
||||
const wxRegion& m_clip;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -490,7 +490,6 @@ wxClientDCImpl::wxClientDCImpl(wxClientDC* owner, wxWindow* window)
|
|||
|
||||
wxPaintDCImpl::wxPaintDCImpl(wxPaintDC* owner, wxWindow* window)
|
||||
: wxGTKCairoDCImpl(owner, window)
|
||||
, m_clip(window->m_nativeUpdateRegion)
|
||||
{
|
||||
cairo_t* cr = window->GTKPaintContext();
|
||||
wxCHECK_RET(cr, "using wxPaintDC without being in a native paint event");
|
||||
|
|
@ -501,20 +500,6 @@ wxPaintDCImpl::wxPaintDCImpl(wxPaintDC* owner, wxWindow* window)
|
|||
// context is already adjusted for RTL
|
||||
m_layoutDir = window->GetLayoutDirection();
|
||||
}
|
||||
|
||||
void wxPaintDCImpl::DestroyClippingRegion()
|
||||
{
|
||||
BaseType::DestroyClippingRegion();
|
||||
|
||||
// re-establish clip for paint update area
|
||||
int x, y, w, h;
|
||||
m_clip.GetBox(x, y, w, h);
|
||||
cairo_t* cr = static_cast<cairo_t*>(GetCairoContext());
|
||||
cairo_rectangle(cr,
|
||||
DeviceToLogicalX(x), DeviceToLogicalY(y),
|
||||
DeviceToLogicalXRel(w), DeviceToLogicalYRel(h));
|
||||
cairo_clip(cr);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
wxScreenDCImpl::wxScreenDCImpl(wxScreenDC* owner)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue