@@ -78,7 +78,7 @@ export class ImageRendererService implements OnModuleInit {
|
||||
this.drawMatchBlock(ctx, data, theme, homeImg, awayImg);
|
||||
this.drawScoreBlock(ctx, data, theme);
|
||||
this.drawPicks(ctx, data.topPicks, theme);
|
||||
this.drawFooter(ctx, data, theme);
|
||||
this.drawFooter(ctx, data);
|
||||
|
||||
const buffer = canvas.toBuffer("image/jpeg", { quality: 0.94 });
|
||||
fs.writeFileSync(outPath, buffer);
|
||||
@@ -460,7 +460,7 @@ export class ImageRendererService implements OnModuleInit {
|
||||
});
|
||||
}
|
||||
|
||||
private drawFooter(ctx: any, data: PredictionCardDto, theme: Theme) {
|
||||
private drawFooter(ctx: any, data: PredictionCardDto) {
|
||||
const riskText = `Risk: ${this.translateRisk(data.riskLevel)}`;
|
||||
ctx.font = "900 34px Arial";
|
||||
const riskW = Math.ceil(ctx.measureText(riskText).width + 72);
|
||||
|
||||
Reference in New Issue
Block a user