Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SelectObject(hdc, CreateSolidBrush(RGB(255,255,0)));
- x = sx/40;
- y = sy/40;
- Ellipse(hdc, x - sx/10, y - sx/10, x + sx/10, y + sx/10);
- //Дорога
- y = 3*sy/4;
- SelectObject(hdc, CreateSolidBrush(RGB(79,79,79)));
- Rectangle(hdc, 0, y, sx, sy);
- //Кузов
- x = sx/6;
- y = sy/2;
- SelectObject(hdc, CreateSolidBrush(RGB(125, 125, 0)));
- Rectangle(hdc, x, y, sx - x, 4*sy/5);
- Rectangle(hdc, sx/3, sy/4, sx - sx/3, sy/2+1);
- //Стекла
- SelectObject(hdc, CreateSolidBrush(RGB(96, 143, 252)));
- Rectangle(hdc, sx/3 + sx/100, sy/4 + sy/50, sx/2 - sx/100 , sy/2 - sy/50);
- Rectangle(hdc, sx/2 + sx/100, sy/4 + sy/50, 2*sx/3 - sx/100 , sy/2 - sy/50);
- //Покрышки и диски
- x = x + sx/8;
- y = 4*sy/5;
- SelectObject(hdc, CreateSolidBrush(RGB(0,0,0)));
- Ellipse(hdc, x - sx/20, y - sx/20, x + sx/20, y + sx/20);
- SelectObject(hdc, CreateSolidBrush(RGB(181,181,181)));
- Ellipse(hdc, x - sx/30, y - sx/30, x + sx/30, y + sx/30);
- x = sx - x;
- SelectObject(hdc, CreateSolidBrush(RGB(0,0,0)));
- Ellipse(hdc, x - sx/20, y - sx/20, x + sx/20, y + sx/20);
- SelectObject(hdc, CreateSolidBrush(RGB(181,181,181)));
- Ellipse(hdc, x - sx/30, y - sx/30, x + sx/30, y + sx/30);
- //Фары
- x = 5*sx/6;
- y = 9*sy/16;
- SelectObject(hdc, CreateSolidBrush(RGB(255,255,0)));
- Rectangle(hdc, x - sx/20, y, x, y + sy/20);
- x = sx/6;
- SelectObject(hdc, CreateSolidBrush(RGB(250,130,0)));
- Rectangle(hdc, x, y, x+sx/40, y + sy/20);
- //Разметка
- y = 4*sy/5 + sy/6;
- hpen1 = CreatePen(PS_DASH, sy/80, RGB(255, 255, 255));
- SelectObject(hdc, hpen1);
- MoveToEx(hdc, 0, y, NULL);
- LineTo(hdc, sx, y);
- y = 4*sy/5 + sy/7;
- MoveToEx(hdc, 0, y, NULL);
- LineTo(hdc, sx, y);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement