import { PDFNumber } from "..";
var PDFRectangle = /** @class */ (function () {
    function PDFRectangle(array) {
        this.array = array;
    }
    PDFRectangle.fromArray = function (array) {
        return new PDFRectangle(array);
    };
    PDFRectangle.prototype.setRectangle = function (x, y, width, height) {
        this.array.set(0, PDFNumber.of(x));
        this.array.set(1, PDFNumber.of(y));
        this.array.set(2, PDFNumber.of(x + width));
        this.array.set(3, PDFNumber.of(y + height));
    };
    PDFRectangle.prototype.lowerLeftX = function () {
        return this.array.lookup(0, PDFNumber).value();
    };
    PDFRectangle.prototype.lowerLeftY = function () {
        return this.array.lookup(1, PDFNumber).value();
    };
    PDFRectangle.prototype.upperRightX = function () {
        return this.array.lookup(2, PDFNumber).value();
    };
    PDFRectangle.prototype.upperRightY = function () {
        return this.array.lookup(3, PDFNumber).value();
    };
    return PDFRectangle;
}());
export default PDFRectangle;
//# sourceMappingURL=PDFRectangle.js.map