public static Texture2D FromFile(GraphicsDevice graphicsDevice, Stream textureStream) { MonoMac.Foundation.NSData nsData = MonoMac.Foundation.NSData.FromStream(textureStream); NSImage image = new NSImage(nsData); if (image == null) { throw new ContentLoadException("Error loading Texture2D Stream"); } ESImage theTexture = new ESImage(image, graphicsDevice.PreferedFilter); Texture2D result = new Texture2D(theTexture); return(result); }
public bool CreateFile(string path, NSData data, NSFileAttributes attributes) { return(CreateFile(path, data, attributes.ToDictionary())); }
public void DataLoaded(NSUrlProtocol protocol, NSData data) { Messaging.void_objc_msgSend_IntPtr_IntPtr(this.Handle, Selector.GetHandle(selUrlProtocolDidLoadData_), protocol.Handle, data.Handle); }
protected override void Dispose(bool disposing) { source = null; base.Dispose(disposing); }
public UnmanagedMemoryStreamWithMutableRef(NSData source) : base(source) { base_address = source.Bytes; this.source = source; }
public UnmanagedMemoryStreamWithRef(NSData source) : base((byte *)source.Bytes, source.Length) { this.source = source; }
public UnmanagedMemoryStreamWithRef(NSData source, byte *pointer, long length) : base(pointer, length) { this.source = source; }
public void SetData(string key, NSData value) { _SetData(value, key); }