diff --git a/VERSION b/VERSION index 0a69206..6cbacdc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.10 +2.0.11 diff --git a/src/Import.php b/src/Import.php index 6bd1ea4..f38a769 100644 --- a/src/Import.php +++ b/src/Import.php @@ -149,8 +149,8 @@ class Import extends \Com\Tecnick\Pdf\Image\Output * @param string $image Image file name, URL or a '@' character followed by the image data string. * To link an image without embedding it on the document, set an asterisk * character before the URL (i.e.: '*http://www.example.com/image.jpg'). - * @param int $width New width in pixels or null to keep the original value. - * @param int $height New height in pixels or null to keep the original value. + * @param ?int $width New width in pixels or null to keep the original value. + * @param ?int $height New height in pixels or null to keep the original value. * @param bool $ismask True if the image is a transparency mask. * @param int $quality Quality for JPEG files (0 = max compression; 100 = best quality, bigger file). * @param bool $defprint Indicate if the image is the default @@ -161,8 +161,8 @@ class Import extends \Com\Tecnick\Pdf\Image\Output */ public function add( string $image, - int $width = null, - int $height = null, + ?int $width = null, + ?int $height = null, bool $ismask = false, int $quality = 100, bool $defprint = false, @@ -229,8 +229,8 @@ public function getImageDataByKey(string $key): array * @param string $image Image file name, URL or a '@' character followed by the image data string. * To link an image without embedding it on the document, set an asterisk * character before the URL (i.e.: '*http://www.example.com/image.jpg'). - * @param int $width New width in pixels or null to keep the original value. - * @param int $height New height in pixels or null to keep the original value. + * @param ?int $width New width in pixels or null to keep the original value. + * @param ?int $height New height in pixels or null to keep the original value. * @param bool $ismask True if the image is a transparency mask. * @param int $quality Quality for JPEG files (0 = max compression; 100 = best quality, bigger file). * diff --git a/src/Output.php b/src/Output.php index 39a08b3..5d01697 100644 --- a/src/Output.php +++ b/src/Output.php @@ -99,22 +99,22 @@ public function getObjectNumber(): int /** * Get the PDF output string to print the specified image ID. * - * @param int $iid Image ID. - * @param int $xpos Abscissa (X coordinate) of the upper-left Image corner. - * @param int $ypos Ordinate (Y coordinate) of the upper-left Image corner. - * @param int $width Image width in user units. - * @param int $height Image height in user units. - * @param int $pageheight Page height in user units. + * @param int $iid Image ID. + * @param float $xpos Abscissa (X coordinate) of the upper-left Image corner in user units. + * @param float $ypos Ordinate (Y coordinate) of the upper-left Image corner in user units. + * @param float $width Image width in user units. + * @param float $height Image height in user units. + * @param float $pageheight Page height in user units. * * @return string Image PDF page content. */ public function getSetImage( int $iid, - int $xpos, - int $ypos, - int $width, - int $height, - int $pageheight + float $xpos, + float $ypos, + float $width, + float $height, + float $pageheight ): string { if (empty($this->image[$iid])) { throw new ImageException('Unknown image ID: ' . $iid);