|
@@ -211,14 +211,15 @@ Page({
|
|
|
ctx.setFillStyle(fontTouch.isColor);
|
|
|
// ctx.translate(0, fontTouch.height / 5 * 4);
|
|
|
// ctx.save();
|
|
|
- let movex = fontTouch.x + fontTouch.width / 2;
|
|
|
- let movey = fontTouch.y + fontTouch.height / 10 * 3;
|
|
|
+ let movex = fontTouch.width / 2;
|
|
|
+ let movey = fontTouch.height / 2;
|
|
|
ctx.translate(movex, movey);
|
|
|
ctx.rotate(fontTouch.angle * Math.PI / 180);
|
|
|
- // ctx.translate(movex, movey);
|
|
|
+ ctx.translate(-movex, -movey);
|
|
|
// ctx.rotate(fontTouch.angle * Math.PI / 180);
|
|
|
- ctx.fillText(fontTouch.fontContent, -fontTouch.width / 2, fontTouch.height / 2);
|
|
|
- // ctx.fillText(fontTouch.fontContent, fontTouch.x, fontTouch.y + fontTouch.height / 5 * 4);
|
|
|
+ // ctx.fillText(fontTouch.fontContent, 0, 0);
|
|
|
+ // ctx.translate(fontTouch.x, fontTouch.y + fontTouch.height / 5 * 4);
|
|
|
+ ctx.fillText(fontTouch.fontContent, fontTouch.x, fontTouch.y +fontTouch.height / 5 * 4);
|
|
|
|
|
|
ctx.draw(false,function () {
|
|
|
wx.canvasToTempFilePath({
|
|
@@ -259,7 +260,7 @@ Page({
|
|
|
imgSrcArray.forEach((res) => {
|
|
|
ctx.drawImage(res, dataPositionObj.left * rpx, dataPositionObj.top * rpx, dataPositionObj.width * rpx, dataPositionObj.height * rpx);
|
|
|
})
|
|
|
-
|
|
|
+ wx.hideLoading();
|
|
|
ctx.draw(true, function () {
|
|
|
wx.canvasToTempFilePath({
|
|
|
canvasId: 'comb-canvas' + i,
|