17 lines
342 B
PHP
17 lines
342 B
PHP
|
<?php
|
||
|
|
||
|
namespace NoccyLabs\GdLabel;
|
||
|
|
||
|
class Label extends Element
|
||
|
{
|
||
|
|
||
|
protected function draw($gd, int $x, int $y, int $width, int $height, array $params)
|
||
|
{
|
||
|
if ($bg = $this->getPropRgb("background-color")) {
|
||
|
\imagefilledrectangle($gd, $x, $y, $x + $width, $y + $height, $bg);
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|