feat:Image add pixel API,pass pixels directly to Image

This commit is contained in:
pengfei.zhou
2021-11-19 14:30:24 +08:00
committed by osborn
parent 62cb618923
commit 190eb4afd7
16 changed files with 378 additions and 161 deletions

View File

@@ -2248,10 +2248,20 @@ var BundleResource = /** @class */ (function (_super) {
=======
}(Resource));
var ArrayBufferResource = /** @class */ (function (_super) {
__extends$e(ArrayBufferResource, _super);
__extends$f(ArrayBufferResource, _super);
function ArrayBufferResource(data) {
return _super.call(this, "arrayBuffer", "") || this;
var _this = _super.call(this, "arrayBuffer", "") || this;
_this.data = data;
return _this;
}
ArrayBufferResource.prototype.toModel = function () {
return {
data: this.data,
resId: this.resId,
type: this.type,
identifier: this.identifier,
};
};
return ArrayBufferResource;
}(Resource));
>>>>>>> f476a5b0... feat:android support ArrayBuffer Resource
@@ -2300,6 +2310,16 @@ var Image = /** @class */ (function (_super) {
Image.prototype.stopAnimating = function (context) {
return this.nativeChannel(context, "stopAnimating")();
};
Image.prototype.getImageInfo = function (context) {
return this.nativeChannel(context, "getImageInfo")();
};
Image.prototype.getImagePixels = function (context) {
return this.nativeChannel(context, "getImagePixels")();
};
__decorate$b([
Property,
__metadata$b("design:type", Object)
], Image.prototype, "imagePixels", void 0);
__decorate$b([
Property,
__metadata$b("design:type", Resource)

View File

@@ -1683,6 +1683,15 @@ class BundleResource extends iOSResource {
class ArrayBufferResource extends Resource {
constructor(data) {
super("arrayBuffer", "");
this.data = data;
}
toModel() {
return {
data: this.data,
resId: this.resId,
type: this.type,
identifier: this.identifier,
};
}
}
@@ -1711,7 +1720,17 @@ class Image extends View {
stopAnimating(context) {
return this.nativeChannel(context, "stopAnimating")();
}
getImageInfo(context) {
return this.nativeChannel(context, "getImageInfo")();
}
getImagePixels(context) {
return this.nativeChannel(context, "getImagePixels")();
}
}
__decorate$b([
Property,
__metadata$b("design:type", Object)
], Image.prototype, "imagePixels", void 0);
__decorate$b([
Property,
__metadata$b("design:type", Resource)

View File

@@ -3211,6 +3211,15 @@ class BundleResource extends iOSResource {
class ArrayBufferResource extends Resource {
constructor(data) {
super("arrayBuffer", "");
this.data = data;
}
toModel() {
return {
data: this.data,
resId: this.resId,
type: this.type,
identifier: this.identifier,
};
}
}
@@ -3239,7 +3248,17 @@ class Image extends View {
stopAnimating(context) {
return this.nativeChannel(context, "stopAnimating")();
}
getImageInfo(context) {
return this.nativeChannel(context, "getImageInfo")();
}
getImagePixels(context) {
return this.nativeChannel(context, "getImagePixels")();
}
}
__decorate$b([
Property,
__metadata$b("design:type", Object)
], Image.prototype, "imagePixels", void 0);
__decorate$b([
Property,
__metadata$b("design:type", Resource)