public RenderAaCallbackWrapper(Art.RenderAaCallback managed) { this.managed = managed; if (managed != null) { NativeDelegate = new RenderAaCallbackNative(NativeCallback); } }
public void RenderAa(int x0, int y0, int x1, int y1, Art.RenderAaCallback cb) { IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal(System.Runtime.InteropServices.Marshal.SizeOf(this)); System.Runtime.InteropServices.Marshal.StructureToPtr(this, this_as_native, false); ArtSharp.RenderAaCallbackWrapper cb_wrapper = new ArtSharp.RenderAaCallbackWrapper(cb); art_svp_render_aa(this_as_native, x0, y0, x1, y1, cb_wrapper.NativeDelegate, IntPtr.Zero); ReadNative(this_as_native, ref this); System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native); }