作者 李忠强
1 个管道 的构建 通过 耗费 3 秒

更新

... ... @@ -455,10 +455,45 @@ class Mycenter extends Api
$image->text($this->auth->idea_number,$ttf,40,[255,255,255,20],[200,460]);
$image->text($this->auth->collection_number,$ttf,40,[255,255,255,20],[190,560]);
$image->text($this->getUserPercentage($this->auth->idea_number),$ttf,40,[255,255,255,20],[280,650]);
$i = 990;
foreach ($list as $key => $value){
$image->text($value,$ttf,18,[0,0,0,20],[10,$i]);
$i+=50;
$count = count($list);
switch ($count){
case 1:
$i = 995;
$i+=100;
$image->text($list[0],$ttf,18,[0,0,0,20],[10,$i]);
break;
case 2:
$i = 995;
$i+=50;
$image->text($list[0],$ttf,18,[0,0,0,20],[10,$i]);
$i+=100;
$image->text($list[1],$ttf,18,[0,0,0,20],[10,$i]);
break;
case 3:
$i = 995;
$image->text($list[0],$ttf,18,[0,0,0,20],[10,$i]);
$i+=100;
$image->text($list[1],$ttf,18,[0,0,0,20],[10,$i]);
$i+=100;
$image->text($list[2],$ttf,18,[0,0,0,20],[10,$i]);
break;
case 4:
$i = 1005;
$image->text($list[0],$ttf,18,[0,0,0,20],[10,$i]);
$i+=60;
$image->text($list[1],$ttf,18,[0,0,0,20],[10,$i]);
$i+=60;
$image->text($list[2],$ttf,18,[0,0,0,20],[10,$i]);
$i+=60;
$image->text($list[3],$ttf,18,[0,0,0,20],[10,$i]);
break;
default:
$i = 995;
foreach ($list as $key => $value){
$image->text($value,$ttf,18,[0,0,0,20],[10,$i]);
$i+=50;
}
break;
}
$image->save(ROOT_PATH.'public/userposter/'.$this->auth->id.'-bg.jpg');
unlink($avatar[0]);
... ...

1.2 MB | 宽: | 高:

1.2 MB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖