Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public bool CreateFile(string path, NSData data, NSFileAttributes attributes)
 {
     return(CreateFile(path, data, attributes.ToDictionary()));
 }
Ejemplo n.º 3
0
 public void DataLoaded(NSUrlProtocol protocol, NSData data)
 {
     Messaging.void_objc_msgSend_IntPtr_IntPtr(this.Handle, Selector.GetHandle(selUrlProtocolDidLoadData_), protocol.Handle, data.Handle);
 }
Ejemplo n.º 4
0
 protected override void Dispose(bool disposing)
 {
     source = null;
     base.Dispose(disposing);
 }
Ejemplo n.º 5
0
 public UnmanagedMemoryStreamWithMutableRef(NSData source) : base(source)
 {
     base_address = source.Bytes;
     this.source  = source;
 }
Ejemplo n.º 6
0
 public UnmanagedMemoryStreamWithRef(NSData source) : base((byte *)source.Bytes, source.Length)
 {
     this.source = source;
 }
Ejemplo n.º 7
0
 public UnmanagedMemoryStreamWithRef(NSData source, byte *pointer, long length) : base(pointer, length)
 {
     this.source = source;
 }
Ejemplo n.º 8
0
 public void SetData(string key, NSData value)
 {
     _SetData(value, key);
 }