@@ -250,6 +250,9 @@ discard block |
||
| 250 | 250 | return $img; |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | + /** |
|
| 254 | + * @param null|resource $aHdl |
|
| 255 | + */ |
|
| 253 | 256 | public function SetCanvasH($aHdl) |
| 254 | 257 | { |
| 255 | 258 | $this->img = $aHdl; |
@@ -635,12 +638,21 @@ discard block |
||
| 635 | 638 | } |
| 636 | 639 | |
| 637 | 640 | // Set text alignment |
| 641 | + |
|
| 642 | + /** |
|
| 643 | + * @param string $halign |
|
| 644 | + */ |
|
| 638 | 645 | public function SetTextAlign($halign, $valign = "bottom") |
| 639 | 646 | { |
| 640 | 647 | $this->text_halign = $halign; |
| 641 | 648 | $this->text_valign = $valign; |
| 642 | 649 | } |
| 643 | 650 | |
| 651 | + /** |
|
| 652 | + * @param double $x |
|
| 653 | + * @param double $y |
|
| 654 | + * @param string $paragraph_align |
|
| 655 | + */ |
|
| 644 | 656 | public function _StrokeBuiltinFont($x, $y, $txt, $dir, $paragraph_align, &$aBoundingBox, $aDebug = false) |
| 645 | 657 | { |
| 646 | 658 | if (is_numeric($dir) && $dir != 90 && $dir != 0) { |
@@ -739,6 +751,10 @@ discard block |
||
| 739 | 751 | return $a; |
| 740 | 752 | } |
| 741 | 753 | |
| 754 | + /** |
|
| 755 | + * @param integer $size |
|
| 756 | + * @param string $fontfile |
|
| 757 | + */ |
|
| 742 | 758 | public function imagettfbbox_fixed($size, $angle, $fontfile, $text) |
| 743 | 759 | { |
| 744 | 760 | if (!USE_LIBRARY_IMAGETTFBBOX) { |
@@ -831,6 +847,9 @@ discard block |
||
| 831 | 847 | return $bbox; |
| 832 | 848 | } |
| 833 | 849 | |
| 850 | + /** |
|
| 851 | + * @return double |
|
| 852 | + */ |
|
| 834 | 853 | public function GetBBoxTTF($aTxt, $aAngle = 0) |
| 835 | 854 | { |
| 836 | 855 | // Normalize the bounding box to become a minimum |
@@ -898,6 +917,11 @@ discard block |
||
| 898 | 917 | return $box[2] - $box[0] + 1; |
| 899 | 918 | } |
| 900 | 919 | |
| 920 | + /** |
|
| 921 | + * @param double $x |
|
| 922 | + * @param double $y |
|
| 923 | + * @param string $paragraph_align |
|
| 924 | + */ |
|
| 901 | 925 | public function _StrokeTTF($x, $y, $txt, $dir, $paragraph_align, &$aBoundingBox, $debug = false) |
| 902 | 926 | { |
| 903 | 927 | |
@@ -1167,6 +1191,9 @@ discard block |
||
| 1167 | 1191 | $this->current_color_name = $this->colorstack[--$this->colorstackidx]; |
| 1168 | 1192 | } |
| 1169 | 1193 | |
| 1194 | + /** |
|
| 1195 | + * @param integer $weight |
|
| 1196 | + */ |
|
| 1170 | 1197 | public function SetLineWeight($weight) |
| 1171 | 1198 | { |
| 1172 | 1199 | $old = $this->line_weight; |
@@ -1181,6 +1208,10 @@ discard block |
||
| 1181 | 1208 | $this->lasty = round($y); |
| 1182 | 1209 | } |
| 1183 | 1210 | |
| 1211 | + /** |
|
| 1212 | + * @param integer $s |
|
| 1213 | + * @param integer $e |
|
| 1214 | + */ |
|
| 1184 | 1215 | public function Arc($cx, $cy, $w, $h, $s, $e) |
| 1185 | 1216 | { |
| 1186 | 1217 | // GD Arc doesn't like negative angles |
@@ -1288,6 +1319,10 @@ discard block |
||
| 1288 | 1319 | } |
| 1289 | 1320 | |
| 1290 | 1321 | // Set line style dashed, dotted etc |
| 1322 | + |
|
| 1323 | + /** |
|
| 1324 | + * @param string $s |
|
| 1325 | + */ |
|
| 1291 | 1326 | public function SetLineStyle($s) |
| 1292 | 1327 | { |
| 1293 | 1328 | if (is_numeric($s)) { |
@@ -1503,6 +1538,13 @@ discard block |
||
| 1503 | 1538 | $this->FilledPolygon([$xl, $yu, $xr, $yu, $xr, $yl, $xl, $yl]); |
| 1504 | 1539 | } |
| 1505 | 1540 | |
| 1541 | + /** |
|
| 1542 | + * @param integer $xl |
|
| 1543 | + * @param integer $yu |
|
| 1544 | + * @param integer $yl |
|
| 1545 | + * @param string $color1 |
|
| 1546 | + * @param string $color2 |
|
| 1547 | + */ |
|
| 1506 | 1548 | public function FilledRectangle2($xl, $yu, $xr, $yl, $color1, $color2, $style = 1) |
| 1507 | 1549 | { |
| 1508 | 1550 | // Fill a rectangle with lines of two colors |
@@ -1536,6 +1578,10 @@ discard block |
||
| 1536 | 1578 | } |
| 1537 | 1579 | } |
| 1538 | 1580 | |
| 1581 | + /** |
|
| 1582 | + * @param integer $xl |
|
| 1583 | + * @param integer $yu |
|
| 1584 | + */ |
|
| 1539 | 1585 | public function ShadowRectangle($xl, $yu, $xr, $yl, $fcolor = false, $shadow_width = 4, $shadow_color = 'darkgray', $useAlpha = true) |
| 1540 | 1586 | { |
| 1541 | 1587 | // This is complicated by the fact that we must also handle the case where |
@@ -1572,6 +1618,10 @@ discard block |
||
| 1572 | 1618 | } |
| 1573 | 1619 | } |
| 1574 | 1620 | |
| 1621 | + /** |
|
| 1622 | + * @param double $xr |
|
| 1623 | + * @param double $yl |
|
| 1624 | + */ |
|
| 1575 | 1625 | public function FilledRoundedRectangle($xt, $yt, $xr, $yl, $r = 5) |
| 1576 | 1626 | { |
| 1577 | 1627 | if ($r == 0) { |
@@ -1603,6 +1653,10 @@ discard block |
||
| 1603 | 1653 | $this->FilledArc($xr - $r, $yl - $r, $r * 2, $r * 2, 0, 90); |
| 1604 | 1654 | } |
| 1605 | 1655 | |
| 1656 | + /** |
|
| 1657 | + * @param double $xr |
|
| 1658 | + * @param double $yl |
|
| 1659 | + */ |
|
| 1606 | 1660 | public function RoundedRectangle($xt, $yt, $xr, $yl, $r = 5) |
| 1607 | 1661 | { |
| 1608 | 1662 | if ($r == 0) { |