@meta2d/core 1.0.74 → 1.0.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/pen/render.js CHANGED
@@ -1036,16 +1036,15 @@ export function getFont({ fontStyle = 'normal', textDecoration = 'normal', fontW
1036
1036
  } = {}) {
1037
1037
  return `${fontStyle} ${textDecoration} ${fontWeight} ${fontSize}px/${lineHeight} ${fontFamily}`;
1038
1038
  }
1039
- // TODO: 0.5 偏移量在 图片中可能存在问题
1040
1039
  export function ctxFlip(ctx, pen) {
1041
1040
  // worldRect 可能为 undefined
1042
1041
  const { x, ex, y, ey } = pen.calculative.worldRect || {};
1043
1042
  if (pen.calculative.flipX) {
1044
- ctx.translate(x + ex + 0.5, 0.5);
1043
+ ctx.translate(x + ex, 0);
1045
1044
  ctx.scale(-1, 1);
1046
1045
  }
1047
1046
  if (pen.calculative.flipY) {
1048
- ctx.translate(0.5, y + ey + 0.5);
1047
+ ctx.translate(0, y + ey);
1049
1048
  ctx.scale(1, -1);
1050
1049
  }
1051
1050
  }