Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function getImage($width = 400, $height = 400) |
||
19 | { |
||
20 | $image = imagecreatetruecolor($width, $height); |
||
21 | $textColor = imagecolorallocate($image, 255, 255, 255); |
||
22 | |||
23 | foreach (str_split($this->getMessage(), intval($width / 10)) as $line => $text) { |
||
24 | imagestring($image, 5, 10, (($line + 1) * 18), $text, $textColor); |
||
25 | } |
||
26 | |||
27 | return new Image(new Libs\Gd($image)); |
||
28 | } |
||
29 | } |
||
30 |