use the real clipping region and not just its bounding box in :DoDrawBitmap() (#9597)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#endif
|
||||
|
||||
#include "wx/fontutil.h"
|
||||
#include "wx/vector.h"
|
||||
|
||||
#include "wx/x11/private.h"
|
||||
#include "wx/x11/dcclient.h"
|
||||
@@ -1219,9 +1220,20 @@ void wxWindowDCImpl::DoDrawBitmap( const wxBitmap &bitmap,
|
||||
XSetStipple( xdisplay, gc, (Pixmap) mask);
|
||||
}
|
||||
|
||||
wxCoord clip_x, clip_y, clip_w, clip_h;
|
||||
m_currentClippingRegion.GetBox(clip_x, clip_y, clip_w, clip_h);
|
||||
XFillRectangle( xdisplay, new_pixmap, gc, clip_x-xx, clip_y-yy, clip_w, clip_h );
|
||||
wxVector<XRectangle> rects;
|
||||
for ( wxRegionIterator iter(m_currentClippingRegion);
|
||||
iter;
|
||||
++iter )
|
||||
{
|
||||
XRectangle rect;
|
||||
rect.x = iter.GetX() - xx;
|
||||
rect.y = iter.GetY() - yy;
|
||||
rect.width = iter.GetWidth();
|
||||
rect.height = iter.GetHeight();
|
||||
rects.push_back(rect);
|
||||
}
|
||||
|
||||
XFillRectangles(xdisplay, new_pixmap, gc, &rects[0], rects.size());
|
||||
|
||||
XFreeGC( xdisplay, gc );
|
||||
}
|
||||
|
Reference in New Issue
Block a user