react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
41 lines (38 loc) • 949 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.CroppingViewResult = void 0;
var _imageRef = require("../../imageRef");
class CroppingViewResult {
/**
* The polygon of the cropped area.
*/
polygon = [];
/**
* The rotation of the resulting cropped area
*/
rotation = 'NONE';
/**
A crop from the input image.
*/
sourceImage = null;
constructor(source) {
if (source.polygon !== undefined) {
this.polygon = source.polygon.map(it => {
return {
x: it.x,
y: it.y
};
});
}
if (source.sourceImage !== undefined) {
this.sourceImage = source.sourceImage != null ? _imageRef.ImageRef.From(source.sourceImage) : null;
}
if (source.rotation !== undefined) {
this.rotation = source.rotation;
}
}
}
exports.CroppingViewResult = CroppingViewResult;
//# sourceMappingURL=ScanbotCroppingViewProperties.js.map