- 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());