mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Fix
This commit is contained in:
@@ -35,10 +35,10 @@ module.exports = class FacesCommand extends Command {
|
||||
ctx.drawImage(base, 0, 0);
|
||||
for (const face of faces) {
|
||||
ctx.fillStyle = 'blue';
|
||||
ctx.fillRect(face.box.xMin, face.box.yMax, 10, face.box.height);
|
||||
ctx.fillRect(face.box.xMin, face.box.xMax, face.box.width, 10);
|
||||
ctx.fillRect(face.box.yMin, face.box.yMax, face.box.width, 10);
|
||||
ctx.fillRect(face.box.yMin, face.box.xMax, 10, face.box.height);
|
||||
ctx.fillRect(face.box.xMin, face.box.yMin, 10, face.box.height);
|
||||
ctx.fillRect(face.box.xMin, face.box.yMin, face.box.width, 10);
|
||||
ctx.fillRect(face.box.xMin, face.box.yMax, face.box.width, 10);
|
||||
ctx.fillRect(face.box.xMax, face.box.yMin, 10, face.box.height);
|
||||
}
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'faces.png' }] });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user