git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54316
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#endif
#include "wx/fontutil.h"
#endif
#include "wx/fontutil.h"
#include "wx/x11/private.h"
#include "wx/x11/dcclient.h"
#include "wx/x11/private.h"
#include "wx/x11/dcclient.h"
IMPLEMENT_ABSTRACT_CLASS(wxWindowDCImpl, wxX11DCImpl)
IMPLEMENT_ABSTRACT_CLASS(wxWindowDCImpl, wxX11DCImpl)
-wxWindowDCImpl::wxWindowDCImpl( wxDC *owner )
+wxWindowDCImpl::wxWindowDCImpl( wxDC *owner )
XSetStipple( xdisplay, gc, (Pixmap) mask);
}
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 );
}
XFreeGC( xdisplay, gc );
}
else
XCopyArea( (Display*) m_display, (Pixmap) use_bitmap.GetPixmap(), (Window) m_x11window,
(GC) m_penGC, 0, 0, ww, hh, xx, yy );
else
XCopyArea( (Display*) m_display, (Pixmap) use_bitmap.GetPixmap(), (Window) m_x11window,
(GC) m_penGC, 0, 0, ww, hh, xx, yy );
// remove mask again if any
if (setClipMask)
{
// remove mask again if any
if (setClipMask)
{
if (src_impl->m_isMemDC)
{
wxBitmap selected = memDC->GetSelectedBitmap();
if (src_impl->m_isMemDC)
{
wxBitmap selected = memDC->GetSelectedBitmap();
if (!selected.IsOk()) return false;
/* we use the "XCopyArea" way to copy a memory dc into
if (!selected.IsOk()) return false;
/* we use the "XCopyArea" way to copy a memory dc into
if (use_bitmap_method)
{
wxBitmap selected = memDC->GetSelectedBitmap();
if (use_bitmap_method)
{
wxBitmap selected = memDC->GetSelectedBitmap();
// scale/translate bitmap size
wxCoord bm_width = selected.GetWidth();
wxCoord bm_height = selected.GetHeight();
// scale/translate bitmap size
wxCoord bm_width = selected.GetWidth();
wxCoord bm_height = selected.GetHeight();
SetLogicalFunction( old_logical_func );
return false;
}
SetLogicalFunction( old_logical_func );
return false;
}
if ((width != ww) || (height != hh))
{
/* Draw source window into a bitmap as we cannot scale
if ((width != ww) || (height != hh))
{
/* Draw source window into a bitmap as we cannot scale