From 83b47c8a3b45afb558fd2ee6ee5c75ebb9328217 Mon Sep 17 00:00:00 2001 From: Yu Jiang Tham Date: Wed, 21 May 2014 15:26:27 -0700 Subject: [PATCH] rectangle function utilizes two cvpoints that are top-left, bottom-right --- src/Matrix.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Matrix.cc b/src/Matrix.cc index 46fca42..4572da5 100755 --- a/src/Matrix.cc +++ b/src/Matrix.cc @@ -605,7 +605,7 @@ Matrix::Rectangle(const Arguments& args) { if(args[3]->IntegerValue()) thickness = args[3]->IntegerValue(); - cv::rectangle(self->mat, cv::Point(x, y), cv::Point(width, height), color, thickness); + cv::rectangle(self->mat, cv::Point(x, y), cv::Point(x+width, y+height), color, thickness); } return scope.Close(v8::Null());