#include "stdafx.h"
#include "cv.h"
#include "highgui.h"
int main(int argc, char* argv[])
{
char wndname[] = "Drawing Demo";
cvNamedWindow(wndname);
int arr[1];
arr[0] = 4;
CvPoint ** pt = new CvPoint*[1];
pt[0] = new CvPoint[4];
pt[0][0] = cvPoint(0,0);
pt[0][1] = cvPoint(100,10);
pt[0][2] = cvPoint(30,60);
pt[0][3] = cvPoint(10,100);
IplImage* image = cvCreateImage( cvSize(200,200), 8, 3 );
cvPolyLine( image, pt, arr, 1, 1, CV_RGB(250,0,0));
cvFillPoly(image,pt,arr,1,CV_RGB(250,0,0));
cvShowImage(wndname,image);
cvWaitKey(1000000);
return 0;
}