切换导航条
此项目
正在载入...
登录
何书鹏
/
recruit
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
何书鹏
4 years ago
提交
7e7110e0dff79618e64e80891b7feeb4528c821f
1 个父辈
2de667ee
1 个管道 的构建
通过
耗费 1 秒
二开海报
变更
1
构建
2
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
27 行增加
和
12 行删除
application/api/controller/v2/Index.php
application/api/controller/v2/Index.php
查看文件 @
7e7110e
...
...
@@ -455,28 +455,43 @@ class Index extends Api
$w
=
$box1_maxx
-
$box1_minx
;
$box1_minx
+=
(
$image
->
width
()
-
$w
)
/
2
;
// 备注居中
$last_text
=
'码上报名'
;
$box2
=
imagettfbbox
(
$size
,
0
,
$path_ttf
,
$last_text
);
// 工价
$size_11
=
11
;
$factory_price_total
=
'工价:'
.
$job
[
'factory_price_total'
]
.
'元/小时'
;
$box2
=
imagettfbbox
(
$size_11
,
0
,
$path_ttf
,
$factory_price_total
);
$box2_minx
=
min
(
$box2
[
0
],
$box2
[
2
],
$box2
[
4
],
$box2
[
6
]);
$box2_maxx
=
max
(
$box2
[
0
],
$box2
[
2
],
$box2
[
4
],
$box2
[
6
]);
/* 计算文字初始坐标和尺寸 */
$w
=
$box2_maxx
-
$box2_minx
;
$box2_minx
+=
(
$image
->
width
()
-
$w
)
/
2
;
$box2_minx
+=
$image
->
width
()
-
$w
-
57
;
// 工价、工资
$factory_price_total
=
'工价:'
.
$job
[
'factory_price_total'
]
.
'元/小时'
;
// 工资
$salary
=
'工资:'
.
$job
[
'salary'
]
.
'元/月'
;
$box3
=
imagettfbbox
(
$size_11
,
0
,
$path_ttf
,
$salary
);
$box3_minx
=
min
(
$box3
[
0
],
$box3
[
2
],
$box3
[
4
],
$box3
[
6
]);
$box3_maxx
=
max
(
$box3
[
0
],
$box3
[
2
],
$box3
[
4
],
$box3
[
6
]);
/* 计算文字初始坐标和尺寸 */
$w
=
$box3_maxx
-
$box3_minx
;
$box3_minx
+=
$image
->
width
()
-
$w
-
57
;
// 备注居中
$last_text
=
'码上报名'
;
$box4
=
imagettfbbox
(
$size
,
0
,
$path_ttf
,
$last_text
);
$box4_minx
=
min
(
$box4
[
0
],
$box4
[
2
],
$box4
[
4
],
$box4
[
6
]);
$box4_maxx
=
max
(
$box4
[
0
],
$box4
[
2
],
$box4
[
4
],
$box4
[
6
]);
/* 计算文字初始坐标和尺寸 */
$w
=
$box4_maxx
-
$box4_minx
;
$box4_minx
+=
(
$image
->
width
()
-
$w
)
/
2
;
$image
->
water
(
$job_image
,[
12
,
12
])
->
text
(
$job
[
'job_name'
],
$path_ttf
,
$size
,
'#323233'
,[
$box1_minx
,
205
])
->
text
(
$job
[
'job_name'
],
$path_ttf
,
$size
,
'#323233'
,[
$box1_minx
+
1
,
205
])
//画两遍,加粗
->
text
(
$factory_price_total
,
$path_ttf
,
11
,
'#323233'
,[
178
,
238
])
->
text
(
$factory_price_total
,
$path_ttf
,
11
,
'#323233'
,[
179
,
238
])
->
text
(
$salary
,
$path_ttf
,
11
,
'#323233'
,[
137
,
266
])
->
text
(
$salary
,
$path_ttf
,
11
,
'#323233'
,[
138
,
266
])
->
text
(
$last_text
,
$path_ttf
,
$size
,
'#FE9515'
,[
$box2_minx
,
322
])
->
text
(
$last_text
,
$path_ttf
,
$size
,
'#FE9515'
,[
$box2_minx
+
1
,
322
])
->
text
(
$factory_price_total
,
$path_ttf
,
$size_11
,
'#323233'
,[
$box2_minx
,
238
])
->
text
(
$factory_price_total
,
$path_ttf
,
$size_11
,
'#323233'
,[
$box2_minx
+
1
,
238
])
->
text
(
$salary
,
$path_ttf
,
$size_11
,
'#323233'
,[
$box3_minx
,
266
])
->
text
(
$salary
,
$path_ttf
,
$size_11
,
'#323233'
,[
$box3_minx
+
1
,
266
])
->
text
(
$last_text
,
$path_ttf
,
$size
,
'#FE9515'
,[
$box4_minx
,
322
])
->
text
(
$last_text
,
$path_ttf
,
$size
,
'#FE9515'
,[
$box4_minx
+
1
,
322
])
->
water
(
$qrcode
,[
124
,
349
])
->
save
(
$filename
);
$url
=
request
()
->
domain
()
.
'/'
.
$filename
.
'?v='
.
time
();
...
...
请
注册
或
登录
后发表评论