ソースを参照

寻找中心点

wangyong 6 年 前
コミット
b528098368
1 ファイル変更5 行追加5 行削除
  1. 5 5
      customized/pages/made/combination/combination.js

+ 5 - 5
customized/pages/made/combination/combination.js

@@ -161,14 +161,14 @@ Page({
     const ctx = wx.createCanvasContext('comb-font');
     const ctx = wx.createCanvasContext('comb-font');
 
 
     let movex = fontTouch.x + fontTouch.width / 2;
     let movex = fontTouch.x + fontTouch.width / 2;
-    let movey = fontTouch.y + fontTouch.height / 5 * 4 / 2;
-    ctx.translate(movex, movey);
-    ctx.rotate(fontTouch.angle * Math.PI / 180);
+    let movey = fontTouch.y + fontTouch.height/ 2;
+    // ctx.translate(movex, movey);
+    // ctx.rotate(fontTouch.angle * Math.PI / 180);
 
 
     ctx.setFontSize(fontTouch.fontSize);
     ctx.setFontSize(fontTouch.fontSize);
     ctx.setFillStyle(fontTouch.isColor);
     ctx.setFillStyle(fontTouch.isColor);
-    // ctx.fillText(fontTouch.fontContent, fontTouch.x, fontTouch.y + fontTouch.height / 5 *4);
-    ctx.fillText(fontTouch.fontContent, -fontTouch.width / 2, fontTouch.height / 5 * 2);
+    ctx.fillText(fontTouch.fontContent, fontTouch.x, fontTouch.y + fontTouch.height / 5 *4);
+    // ctx.fillText(fontTouch.fontContent, -fontTouch.width / 2, fontTouch.height / 10 * 3);
     ctx.draw()
     ctx.draw()
   },
   },
   getComb(that,imgSrc){
   getComb(that,imgSrc){