sharp-agezi 6 yıl önce
ebeveyn
işleme
c430d6a7ce

+ 6 - 4
customized/pages/made/combination/combination.js

@@ -82,7 +82,7 @@ Page({
    */
   onShow: function () {
     this.getCombImg(this);
-
+   
 
   },
 
@@ -169,19 +169,21 @@ Page({
   },
   getCombFont(that) {
     let fontTouch = that.data.fontTouch;
+    // fontTouch.width = 123;
+    // fontTouch.height=132;
     let dataPositionObj = that.data.dataPositionObj;
     const ctx = wx.createCanvasContext('comb-font');
     ctx.setFontSize(fontTouch.fontSize);
     ctx.setFillStyle(fontTouch.isColor);
-    // ctx.translate(0, 0);
+    // 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 movey = fontTouch.y + fontTouch.height / 10* 3 ;
     ctx.translate(movex, movey);
     ctx.rotate(fontTouch.angle * Math.PI / 180);
     // 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.width / 2, fontTouch.height / 2);
     // ctx.fillText(fontTouch.fontContent, fontTouch.x, fontTouch.y + fontTouch.height / 5 * 4);
     
     ctx.draw(true, function () {

+ 1 - 1
customized/pages/made/combination/combination.wxml

@@ -4,4 +4,4 @@
     <canvas canvas-id='comb-font' class='comb-font'  hidden='{{canvasHidden}}'></canvas>
 <!-- </view> -->
 <image src='{{buildSrc}}'></image>
- <!-- // "disableScroll": true -->
+ <!-- // "disableScroll": true -->