Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // WHERE TO PASTE:
- // In WndProc, inside WM_PAINT case, between BeginPaint and EndPaint
- // 3D Rectangle
- POINT p[4];
- p[0].x = 200; p[0].y = 200;
- p[1].x = 500; p[1].y = 200;
- p[2].x = 550; p[2].y = 150;
- p[3].x = 250; p[3].y = 150;
- Polygon(hdc, p, 4);
- p[0].x = 500; p[0].y = 400;
- p[1].x = 550; p[1].y = 350;
- p[2].x = 550; p[2].y = 150;
- p[3].x = 500; p[3].y = 200;
- Polygon(hdc, p, 4);
- Rectangle(hdc, 200, 200, 500, 400);
- // Diamond
- POINT p[5];
- p[0].x = 500; p[0].y = 500;
- p[1].x = 375; p[1].y = 375;
- p[2].x = 450; p[2].y = 300;
- p[3].x = 550; p[3].y = 300;
- p[4].x = 625; p[4].y = 375;
- Polygon(hdc, p, 5);
- p[0].x = 450; p[0].y = 300;
- p[1].x = 500; p[1].y = 500;
- p[2].x = 550; p[2].y = 300;
- Polygon(hdc, p, 3);
- MoveToEx(hdc, 375, 375, 0);
- LineTo(hdc, 625, 375);
- // Tall Diamond
- POINT p[3];
- p[0].x = 100; p[0].y = 200;
- p[1].x = 125; p[1].y = 200;
- p[2].x = 150; p[2].y = 100;
- Polygon(hdc, p, 3);
- p[0].x = 150; p[0].y = 100;
- p[1].x = 175; p[1].y = 200;
- p[2].x = 200; p[2].y = 200;
- Polygon(hdc, p, 3);
- Arc(hdc, 100, 150, 200, 250, 100, 200, 200, 200);
- Arc(hdc, 125, 175, 175, 225, 100, 200, 200, 200);
- // Cone
- Ellipse(hdc, 100, 325, 250, 275);
- MoveToEx(hdc, 100, 300, 0);
- LineTo(hdc, 175, 150);
- LineTo(hdc, 250, 300);
- MoveToEx(hdc, 175, 150, 0);
- HPEN hPen = CreatePen(PS_DASH, 0, RGB(0, 0, 0));
- SelectObject(hdc, hPen);
- LineTo(hdc, 175, 300);
- // Long 3D Cube
- Rectangle(hdc, 300, 300, 500, 500);
- MoveToEx(hdc, 300, 300, 0);
- LineTo(hdc, 700, 100);
- LineTo(hdc, 500, 300);
- MoveToEx(hdc, 700, 100, 0);
- LineTo(hdc, 500, 500);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement