avoid half pixels

main
Mari 7 months ago
parent df18f05a46
commit 7abab6a001
  1. 4
      src/commands/base.ts

@ -313,7 +313,7 @@ export abstract class AbstractCharacterStatusCommand extends SlashCommand {
const height = metadatas[i].height ?? NORMAL_STATUS_HEIGHT;
maxWidth[polarity] = Math.max(maxWidth[polarity], width);
lastHeight[polarity] = height;
const top = Math.max(totalHeight[polarity], totalHeight[reversePolarity] - lastHeight[reversePolarity] / 2);
const top = Math.max(totalHeight[polarity], totalHeight[reversePolarity] - Math.ceil(lastHeight[reversePolarity] / 2));
topCoordinates[i] = top;
totalHeight[polarity] = top + height;
}
@ -324,7 +324,7 @@ export abstract class AbstractCharacterStatusCommand extends SlashCommand {
background: '#00000000',
channels: 4,
height: Math.max(totalHeight[0], totalHeight[1]),
width: maxWidth[0] + maxWidth[1]
width: maxWidth[0] + maxWidth[1],
}
});
result.composite(

Loading…
Cancel
Save