浏览代码

fix: 绘制文字bug

zhangjie 1 年之前
父节点
当前提交
820c1a83cf
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      electron/preload/api.ts

+ 2 - 1
electron/preload/api.ts

@@ -65,6 +65,7 @@ function drawTrack(
         const fsize = fontSize || defaultFontSize;
         const ny = y + fsize;
         gmObj
+          .stroke(defaultColor, 1)
           .fill(color || defaultColor)
           .fontSize(fsize)
           .drawText(x, ny, text);
@@ -80,7 +81,7 @@ function drawTrack(
         gmObj
           .stroke(defaultColor, 2)
           .fill('none')
-          .drawEllipse(cx, cy, cx, cy, 0, 360);
+          .drawEllipse(cx, cy, rx, ry, 0, 360);
         return;
       }