Home » File Formats » File_PDF » Bug #5230
setFontStyle() and line() with negative coordinates
Details
| Request #5230 | setFontStyle() and line() with negative coordinates |
|---|---|
| Submitted | 2005-08-29 10:28 UTC |
| From | d dot baechtold at unico dot ch |
| Assigned | yunosh |
| Status | Closed |
| Package | File_PDF |
| PHP Version | 5.0.4 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2005-08-29 10:28 UTC] d dot baechtold at unico dot ch
Description:
------------
I used the function setFontStyle($style). Maybe you can add this in the next release if you want. Simpliest way for me to do this was:
public function setFontStyle($style)
{
$this->setFont($this->_font_family, $style);
}
And it would be helpful when all functions with ordinates as parameters could handle negative ordinates like setXY().
I overwrote line() like this:
public function line($x1, $y1, $x2, $y2)
{
if($x1 < 0) $x1 = $this->w + $x1;
if($y1 < 0) $y1 = $this->h + $y1;
if($x2 < 0) $x2 = $this->w + $x2;
if($y2 < 0) $y2 = $this->h + $y2;
parent::line($x1, $y1, $x2, $y2);
}
I found it easier with this to add a line in footer().