private void FillEllipseXLib(Color color, int x, int y, int width, int height) { var gcValues = new XGCValues(); gcValues.foreground = ToPArgb(color); var gcValueMask = XGCValueMask.GCForeground; var gc = LibX11.XCreateGC(display, drawableId, gcValueMask, ref gcValues); try { if (clipRectangles != null) { LibX11.XSetClipRectangles(display, gc, 0, 0, clipRectangles, clipRectangles.Length, 0); } LibX11.XDrawArc(display, drawableId, gc, x, y, (uint)width - 1, (uint)height - 1, 0, 360 * 64); LibX11.XFillArc(display, drawableId, gc, x, y, (uint)width - 1, (uint)height - 1, 0, 360 * 64); } finally { LibX11.XFreeGC(display, gc); } }