#include iostream.h; #include conio.h; #include graphics.h; class Hex { private: int pts[12],dp[12]; int x,y; public: void Draw() { for(int i=0;i<=7;i++) { /*Graphics bitmapGraphics = Graphics.FromImage(bitmap);*/ pts[0] = new PointF(x, y); pts[1] = new PointF(x + 40, y); pts[2] = new PointF(x + 55, y + 15); pts[3] = new PointF(x + 60, y + 45); pts[4] = new PointF(x+100, y + 45); pts[5] = new PointF(x +115, y + 75); dp[12]=new drawpoly(7,pts[0],pts[1],pts[2],pts[3],pts[4],pts[5],pts[0]); /*bitmapGraphics.FillPolygon( );*/ } //bitmapGraphics.Dispose(); bitmap.Dispose(); } }; main() { hexa c; int gd=DETECT,gm; initgraph(&gd, &gm, "C:\\TurboC3\\BGI"); cout<<"enter the values of x and y"; cin>>x>>y; c.Draw(); getch(); closegraph(); return 0; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)