Commit 253de5f9 authored by 李俊赕's avatar 李俊赕

编辑拍照页面

parent c186de06
......@@ -372,20 +372,29 @@
canvas.setFontSize(14)
canvas.setFillStyle('#f2f2f2')
let txt = settingTxtArr[i]
if(txt.length>14){
canvas.fillText(txt.substr(0,14), 10, canvasHeight - txtHeight * h++);
canvas.fillText(txt.substr(14,14), 10, canvasHeight - txtHeight * h++);
}else{
canvas.fillText(txt, 10, canvasHeight - txtHeight * h++);
}
// if(txt.length>14){
// canvas.fillText(txt.substr(14,18), 10, canvasHeight - txtHeight * h++);
// canvas.fillText(txt.substr(0,18), 10, canvasHeight - txtHeight * h++);
// }else{
// canvas.fillText(txt, 10, canvasHeight - txtHeight * h++);
// }
canvas.fillText(txt, 10, canvasHeight - txtHeight * h++);
// canvas.fillText(txt, 10, canvasHeight - txtHeight * h++);
}
const title = this.titleTxt
if(title){
txtHeight = 20
canvas.save()
let titleHeight = title.length>14 ? 60 : 30
canvas.setFillStyle('rgba(34, 114, 255, 0.6)')
canvas.fillRect(10, canvasHeight - txtHeight * h - titleHeight,215, titleHeight)
canvas.restore()
canvas.setFontSize(20)
canvas.setFillStyle('#f2f2f2')
canvas.fillText(title, 10, canvasHeight - txtHeight * h++);
// canvas.setTextAlign('center')
if(title.length>14){
canvas.fillText(title.substr(14,14), 10, canvasHeight - txtHeight * h++);
}
canvas.fillText(title.substr(0,14), 10, canvasHeight - txtHeight * h++ - titleHeight/2);
}
if(this.waterSetting && this.waterSetting.mid_text){
//加入 水印图片
......@@ -511,8 +520,13 @@
white-space: normal;
font-size: 28rpx;
color: #fff;
.big{
&.big{
padding:10rpx;
margin-bottom: 10rpx;
width:430rpx;
line-height: 40rpx;
font-size: 32rpx;
background-color: rgba(34, 114, 255, 0.6);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment