#include "Stdafx.h"
#include "DrawingFunctions.h"

#include <opencv\cv.h>

namespace Domination {
	namespace Unmanaged {
		namespace OpenCV 
		{
			void DrawingFunctions::circle(Mat^ img, System::Drawing::Point^ center, int radius, System::Drawing::Color^ color, int thickness, int lineType, int shift)
			{
				cv::Mat limg = *img->ref;
				cv::circle(limg,
					cv::Point(center->X, center->Y), radius,
					cv::Scalar(color->B, color->G, color->R, color->A),
					thickness, lineType, shift);
			}

			void DrawingFunctions::line(Mat^ img, System::Drawing::Point^ pt1, System::Drawing::Point^ pt2, System::Drawing::Color^ color, int thickness, int lineType, int shift)
			{
				cv::Mat limg = *img->ref;
				cv::line(limg,
					cv::Point(pt1->X, pt1->Y), cv::Point(pt2->X, pt2->Y),
					cv::Scalar(color->B, color->G, color->R, color->A),
					thickness, lineType, shift);
			}
		}
	}
}