Label text fix

This commit is contained in:
Bartek 2024-01-21 19:45:55 +01:00
parent 37eefdc638
commit aa4fb49423
1 changed files with 2 additions and 2 deletions

View File

@ -373,7 +373,7 @@
canvas.height = img.height;
ctx.drawImage(img, 0, 0);
ctx.lineWidth = 15;
ctx.font = "30px serif"; // Zwiększono rozmiar czcionki
ctx.font = "bold 50px Arial"; // Zwiększono rozmiar czcionki
// Draw bounding boxes
boxes.forEach(([x1, y1, x2, y2, object_type, prob]) => {
@ -437,7 +437,7 @@
const width = ctx.measureText(label).width;
ctx.fillRect(x1, y1, width + 10, 25);
ctx.fillStyle = "#000000";
ctx.fillText(label, x1 + width + 15, y1 + 28); // Przesunięcie etykiety
ctx.fillText(label, x1, y1 + 10 ); // Przesunięcie etykiety
});
// Draw legend