Beispiel #1
0
        public static async Task <NativeImage> CreateFromDataURL(string dataURL)
        {
            var proxy = new NativeImage();

            if (scriptProxy != null)
            {
                proxy.ScriptObjectProxy = scriptProxy;
            }

            scriptProxy = await proxy.Initialize("createFromDataURL", dataURL);

            return(proxy);
        }
Beispiel #2
0
        public static async Task <NativeImage> CreateFromPath(string path)
        {
            var proxy = new NativeImage();

            if (scriptProxy != null)
            {
                proxy.ScriptObjectProxy = scriptProxy;
            }

            scriptProxy = await proxy.Initialize(new object[] { "createFromPath", path });

            return(proxy);
        }
Beispiel #3
0
        public static async Task <NativeImage> CreateFromBuffer(byte[] buffer)
        {
            var proxy = new NativeImage();

            if (scriptProxy != null)
            {
                proxy.ScriptObjectProxy = scriptProxy;
            }

            scriptProxy = await proxy.Initialize("createFromBuffer", buffer);

            return(proxy);
        }
Beispiel #4
0
        public static async Task <NativeImage> CreateEmpty()
        {
            var proxy = new NativeImage();

            if (scriptProxy != null)
            {
                proxy.ScriptObjectProxy = scriptProxy;
            }

            scriptProxy = await proxy.Initialize("createEmpty");

            return(proxy);
        }