react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
129 lines (118 loc) • 3.07 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.LineSegmentInt = exports.LineSegmentFloat = exports.AspectRatio = void 0;
var _JsonSerializationTypes = require("../../utils/json/JsonSerializationTypes");
var _utils = require("../../utils/utils");
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten.
/// Generated from core/schemas/Geometry.yaml
/**
Represents a line segment in 2D space.
*/
class LineSegmentInt extends _utils.PartiallyConstructible {
/**
Start point of the segment.
*/
/**
End point of the segment.
*/
/** @param source {@displayType `DeepPartial<LineSegmentInt>`} */
constructor(source = {}) {
super();
if (source.start !== undefined) {
this.start = {
x: source.start.x,
y: source.start.y
};
} else {
throw new Error('start must be present in constructor argument');
}
if (source.end !== undefined) {
this.end = {
x: source.end.x,
y: source.end.y
};
} else {
throw new Error('end must be present in constructor argument');
}
}
serialize(config = new _JsonSerializationTypes.ToJsonConfiguration()) {
return {
start: this.start,
end: this.end
};
}
}
/**
Represents a line segment in 2D space.
*/
exports.LineSegmentInt = LineSegmentInt;
class LineSegmentFloat extends _utils.PartiallyConstructible {
/**
Start point of the segment.
*/
/**
End point of the segment.
*/
/** @param source {@displayType `DeepPartial<LineSegmentFloat>`} */
constructor(source = {}) {
super();
if (source.start !== undefined) {
this.start = {
x: source.start.x,
y: source.start.y
};
} else {
throw new Error('start must be present in constructor argument');
}
if (source.end !== undefined) {
this.end = {
x: source.end.x,
y: source.end.y
};
} else {
throw new Error('end must be present in constructor argument');
}
}
serialize(config = new _JsonSerializationTypes.ToJsonConfiguration()) {
return {
start: this.start,
end: this.end
};
}
}
/**
Aspect ratio is the ratio of the width to the height of an image or screen.
*/
exports.LineSegmentFloat = LineSegmentFloat;
class AspectRatio extends _utils.PartiallyConstructible {
/**
Width component of the aspect ratio.
Default is 1.0
*/
width = 1.0;
/**
Height component of the aspect ratio.
Default is 1.0
*/
height = 1.0;
/** @param source {@displayType `DeepPartial<AspectRatio>`} */
constructor(source = {}) {
super();
if (source.width !== undefined) {
this.width = source.width;
}
if (source.height !== undefined) {
this.height = source.height;
}
}
serialize(config = new _JsonSerializationTypes.ToJsonConfiguration()) {
return {
width: this.width,
height: this.height
};
}
}
exports.AspectRatio = AspectRatio;
//# sourceMappingURL=Geometry.js.map