gc.fillRectangle ((int) rect.x, (int) rect.y, (int) rect.width, (int) rect.height);
gc.fillRectangle ((int) (rect.x + pt.x), (int) (rect.y + pt.y), (int) rect.width, (int) rect.height);
void fillBackground (int control, int context, Rectangle bounds) {	if (OS.HIVIEW) {		OS.CGContextSaveGState (context);		CGRect rect = new CGRect ();		if (bounds != null) {			rect.x = bounds.x;			rect.y = bounds.y;			rect.width = bounds.width;			rect.height = bounds.height;		} else {			OS.HIViewGetBounds (control, rect);		}		Control widget = findBackgroundControl ();		if (widget != null && widget.backgroundImage != null) {			CGPoint pt = new CGPoint();			OS.HIViewConvertPoint (pt, control, widget.handle);			OS.CGContextTranslateCTM (context, -pt.x, -pt.y);			Pattern pattern = new Pattern (display, widget.backgroundImage);			GCData data = new GCData ();			data.device = display;			data.background = widget.getBackgroundColor ().handle;			GC gc = GC.carbon_new (context, data);			gc.setBackgroundPattern (pattern);			gc.fillRectangle ((int) rect.x, (int) rect.y, (int) rect.width, (int) rect.height);			gc.dispose ();			pattern.dispose();		} else if (widget != null && widget.background != null) {			int colorspace = OS.CGColorSpaceCreateDeviceRGB ();			OS.CGContextSetFillColorSpace (context, colorspace);			OS.CGContextSetFillColor (context, widget.background);			OS.CGColorSpaceRelease (colorspace);			OS.CGContextFillRect (context, rect);		} else {			if (OS.VERSION >= 0x1040) {				OS.HIThemeSetFill (OS.kThemeBrushDialogBackgroundActive, 0, context, OS.kHIThemeOrientationNormal);				OS.CGContextFillRect (context, rect);			} else {				Rect rect1 = new Rect ();				rect1.left = (short) rect.x;				rect1.top = (short) rect.y;				rect1.right = (short) (rect.x + rect.width);				rect1.bottom = (short) (rect.y + rect.height);				OS.SetThemeBackground ((short) OS.kThemeBrushDialogBackgroundActive, (short) 0, true);				OS.EraseRect (rect1);			}		}		OS.CGContextRestoreGState (context);	} else {		Rect rect = new Rect ();		OS.GetControlBounds (control, rect);		if (OS.HIVIEW) {			rect.right += rect.left;			rect.bottom += rect.top;			rect.left = rect.top = 0;		}		if (background != null) {			OS.RGBForeColor (toRGBColor (background));			OS.PaintRect (rect);		} else {			OS.SetThemeBackground((short) OS.kThemeBrushDialogBackgroundActive, (short) 0, true);			OS.EraseRect (rect);		}	}}