public IntPtr CreateGdipGraphics() { IntPtr graphics = IntPtr.Zero; //GDIPlus.GdipCreateFromContext_macosx (ctx.GraphicsPort, width, height, out graphics); GDIPlus.GdipCreateFromContext_macosx(ctx.GraphicsPort.Handle, width, height, out graphics); return(graphics); }