Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void MethodsLab1::DrawTriangle(int x1, int y1, int x2, int y2, int x3, int y3)
- {
- GAME_ENGINE->DrawLine(x1, y1, x2, y2);
- GAME_ENGINE->DrawLine(x2, y2, x3, y3);
- GAME_ENGINE->DrawLine(x3, y3, x1, y1);
- }
- void MethodsLab1::DrawTriangle(POINT p1,POINT p2,POINT p3)
- {
- GAME_ENGINE->DrawLine(p1.x, p1.y, p2.x, p2.y);
- GAME_ENGINE->DrawLine(p2.x, p2.y, p3.x, p3.y);
- GAME_ENGINE->DrawLine(p3.x, p3.y, p1.x, p1.y);
- }
- void MethodsLab1::DrawLinearGradient(int x, int y, int height)
- {
- for (int value = 0; value <= 255; value++)
- {
- GAME_ENGINE->SetColor(COLOR(0, 255 - value, value));
- GAME_ENGINE->DrawLine(x + value, y, x + value, y + height);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement