public void Paint(QPainter arg1, QRect arg2, int arg3, ref bool arg4)
{
StackItem[] stack = new StackItem[5];
#if DEBUG
stack[1].s_class = (IntPtr) DebugGCHandle.Alloc(arg1);
#else
stack[1].s_class = (IntPtr) GCHandle.Alloc(arg1);
#endif
#if DEBUG
stack[2].s_class = (IntPtr) DebugGCHandle.Alloc(arg2);
#else
stack[2].s_class = (IntPtr) GCHandle.Alloc(arg2);
#endif
stack[3].s_int = arg3;
stack[4].s_bool = arg4;
interceptor.Invoke("paint##$$", "paint(QPainter*, const QRect&, int, bool*)", stack);
#if DEBUG
DebugGCHandle.Free((GCHandle) stack[1].s_class);
#else
((GCHandle) stack[1].s_class).Free();
#endif
#if DEBUG
DebugGCHandle.Free((GCHandle) stack[2].s_class);
#else
((GCHandle) stack[2].s_class).Free();
#endif
arg4 = stack[4].s_bool;
return;
}