setClipping(rect.x, rect.y, rect.width, rect.height);
if (data.clipRgn == 0) data.clipRgn = OS.gdk_region_new(); OS.gdk_region_subtract(data.clipRgn, data.clipRgn); OS.gdk_region_union(data.clipRgn, clipRgn); if (cairo != 0) { if (data.clippingTransform == null) data.clippingTransform = new double[6]; Cairo.cairo_get_matrix(cairo, data.clippingTransform); setCairoClip(cairo, clipRgn); } else { int  clipping = clipRgn; if (data.damageRgn != 0) { clipping = OS.gdk_region_new(); OS.gdk_region_union(clipping, clipRgn); OS.gdk_region_intersect(clipping, data.damageRgn); } OS.gdk_gc_set_clip_region(handle, clipping); if (clipping != clipRgn) OS.gdk_region_destroy(clipping); }
public void setClipping(Rectangle rect) {	if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);	if (rect == null) {		setClipping(0);	} else {		setClipping(rect.x, rect.y, rect.width, rect.height);	}}