public static function byPdfArray($array, PdfParser $parser)
    {
        $array = PdfArray::ensure(PdfType::resolve($array, $parser), 4)->value;
        $ax = PdfNumeric::ensure(PdfType::resolve($array[0], $parser))->value;
        $ay = PdfNumeric::ensure(PdfType::resolve($array[1], $parser))->value;
        $bx = PdfNumeric::ensure(PdfType::resolve($array[2], $parser))->value;
        $by = PdfNumeric::ensure(PdfType::resolve($array[3], $parser))->value;

        return new self($ax, $ay, $bx, $by);
    }
public static function byPdfArray($array, PdfParser $parser)
    {
        $array = PdfArray::ensure(PdfType::resolve($array, $parser), 4)->value;
        $ax = PdfNumeric::ensure(PdfType::resolve($array[0], $parser))->value;
        $ay = PdfNumeric::ensure(PdfType::resolve($array[1], $parser))->value;
        $bx = PdfNumeric::ensure(PdfType::resolve($array[2], $parser))->value;
        $by = PdfNumeric::ensure(PdfType::resolve($array[3], $parser))->value;

        return new self($ax, $ay, $bx, $by);
    }
public static function byPdfArray ( $ array , PdfParser $ parser ) { $ array = PdfArray :: ensure ( PdfType :: resolve ( $ array , $ parser ) , 4 ) -> value ; $ ax = PdfNumeric :: ensure ( PdfType :: resolve ( $ array [ 0 ] , $ parser ) ) -> value ; $ ay = PdfNumeric :: ensure ( PdfType :: resolve ( $ array [ 1 ] , $ parser ) ) -> value ; $ bx = PdfNumeric :: ensure ( PdfType :: resolve ( $ array [ 2 ] , $ parser ) ) -> value ; $ by = PdfNumeric :: ensure ( PdfType :: resolve ( $ array [ 3 ] , $ parser ) ) -> value ; return new self ( $ ax , $ ay , $ bx , $ by ) ; }
Create a rectangle instance by a PdfArray.

@param PdfArray|mixed $array
@param PdfParser $parser
@return Rectangle
@throws PdfTypeException
@throws CrossReferenceException
@throws PdfParserException
Create a rectangle instance by a PdfArray .