- private void DrawBackground (Hwnd hwnd, IntPtr eventref, HIRect bounds) {
- if (XplatUICarbon.WindowBackgrounds [hwnd] != null) {
- IntPtr context = IntPtr.Zero;
- Color color = (Color) XplatUICarbon.WindowBackgrounds [hwnd];
-
- GetEventParameter (eventref, kEventParamCGContextRef, typeCGContextRef, IntPtr.Zero, (uint) Marshal.SizeOf (typeof (IntPtr)), IntPtr.Zero, ref context);
-
- CGContextSetRGBFillColor (context, (float) color.R / 255, (float) color.G / 255, (float) color.B / 255, (float) color.A / 255);
- CGContextFillRect (context, bounds);
- }
- }
-