Open ghost opened 5 years ago
@tanerolcxy Believe you want something like this: `event.data.forEach(function(rect) { //Replace code here to do something else once working correctly
//draw basic rectangle around face colour black
context.strokeStyle = '#fff';
context.strokeRect(rect.x, rect.y, rect.width, rect.height);
// select size of font
context.font = '11px Helvetica';
//font colour
context.fillStyle = "#fff";
//text to be displayed around face rectangle(will be displayed on the right)
context.fillText('x: ' + rect.x + 'px', rect.x + rect.width + 5, rect.y + 11); // to show xpx
context.fillText('y: ' + rect.y + 'px', rect.x + rect.width + 5, rect.y + 22); // to show ypx
});
});`
This is taken from the example page so nothing here apart from comments are mine.
Hi!
Is it possible to check the dimensions of the rectangle? just like the color, width, height etc.