public void TestNewImage() {
     Action f = () => {
         var i = new ImageElement();
         Done(i != null);
     };
     this.Start(f);
 }
 public void TestImageOnLoad() {
     Action f = () => {
         var img = new ImageElement();
         img.OnLoad = e => {
             Fail();
         };
         img.OnLoad = e => {
             Window.SetTimeout(() => Pass(), 50);
         };
         img.Src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==";
     };
     this.Start(f);
 }
 public extern void DrawImage(ImageElement image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh);
 public extern void DrawImage(ImageElement image, double dx, double dy);
 public extern CanvasPattern CreatePattern(ImageElement image, string repetition);
 public extern void TexImage2D(TextureTarget target, int level, PixelFormat internalFormat, PixelFormat format, DataType type, ImageElement image);
 public static void TexImage2D(this WebGLRenderingContext gl, ImageElement image) {
     gl.TexImage2D(TextureTarget.Texture2D, 0, PixelFormat.Rgba, PixelFormat.Rgba, DataType.UnsignedByte, image);
 }
Exemple #8
0
 public extern CanvasPattern CreatePattern(ImageElement image, string repetition);
Exemple #9
0
 public extern void DrawImage(ImageElement image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh);
Exemple #10
0
 public extern void DrawImage(ImageElement image, double dx, double dy);