koishi-plugin-vsinger-gacha 1.4.2 → 1.4.3

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/lib/render/kit.js CHANGED
@@ -171,8 +171,13 @@ async function card(g, Canvas, o) {
171
171
  if ((TIER[tier] || {}).tag && o.tagsDir && fs.existsSync(tagFile)) {
172
172
  try {
173
173
  const ti = await Canvas.loadImage(tagFile);
174
- const tw = w * 0.46;
175
- g.drawImage(ti, o.x + 4, o.y + 4, tw, (ti.height / ti.width) * tw);
174
+ const tw = w * 0.52;
175
+ // ★ 贴边:裁进卡片圆角内,不留内边距
176
+ g.save();
177
+ roundRect(g, o.x, o.y, w, h, r);
178
+ g.clip();
179
+ g.drawImage(ti, o.x, o.y, tw, (ti.height / ti.width) * tw);
180
+ g.restore();
176
181
  } catch { /* 忽略 */ }
177
182
  }
178
183
  if (o.laser && o.tagsDir) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koishi-plugin-vsinger-gacha",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "VSinger 收藏集抽卡 / 签到积分 / 图鉴(Koishi 插件,一次性安装)",
5
5
  "main": "lib/index.js",
6
6
  "files": [