public link ( float $x, float $y, float $width, float $height, mixed $link ) | ||
$x | float | Abscissa of the upper-left corner of the rectangle. |
$y | float | Ordinate of the upper-left corner of the rectangle. |
$width | float | Width of the rectangle. |
$height | float | Height of the rectangle. |
$link | mixed | URL or identifier returned by {@link addLink()}. |
public function link($x, $y, $width, $height, $link)
{
if ($x < 0) {
$x += $this->w;
}
if ($y < 0) {
$y += $this->h;
}
/* Set up the coordinates with correct scaling in pt. */
$x = $this->_toPt($x);
$y = $this->hPt - $this->_toPt($y);
$width = $this->_toPt($width);
$height = $this->_toPt($height);
/* Save link to page links array. */
$this->_link($x, $y, $width, $height, $link);
}