Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure DrawBug(Canvas: TCanvas; X, Y: Integer; Color: TColor);
- const
- SIZE = 100;
- begin
- with Canvas do
- begin
- Brush.Color := Color;
- Brush.Style := bsSolid;
- Pen.Color := Color;
- Pen.Style := psSolid;
- //Жук
- Pen.Width := 1;
- //Туловище
- Ellipse(X + 30, Y + 30, X + SIZE - 30, Y + SIZE - 10);
- //Голова
- Ellipse(X + 41, Y + 24, X + SIZE - 41, Y + 45);
- //Усы
- Pen.Width := 3;
- //Правый ус
- MoveTo(X + 50, Y + 30);
- LineTo(X + SIZE - 42, Y + 18);
- LineTo(X + SIZE - 47, Y + 11);
- //Левый ус
- MoveTo(X + 50, Y + 30);
- LineTo(X + 42, Y + 18);
- LineTo(X + 47, Y + 11);
- //Лапы
- Pen.Width := 4;
- //Правая верхняя лапа
- MoveTo(X + 50, Y + 45);
- LineTo(X + SIZE - 27, Y + 50);
- LineTo(X + SIZE - 26, Y + 33);
- LineTo(X + SIZE - 19, Y + 30);
- //Левая верхняя лапа
- MoveTo(X + 50, Y + 45);
- LineTo(X + 27, Y + 50);
- LineTo(X + 26, Y + 33);
- LineTo(X + 19, Y + 30);
- //Правая средняя лапа
- MoveTo(X + 50, Y + 55);
- LineTo(X + SIZE - 27, Y + 60);
- LineTo(X + SIZE - 15, Y + 70);
- LineTo(X + SIZE - 8, Y + 63);
- //Левая средняя лапа
- MoveTo(X + 50, Y + 55);
- LineTo(X + 27, Y + 60);
- LineTo(X + 15, Y + 70);
- LineTo(X + 8, Y + 63);
- //Правая задняя лапа
- MoveTo(X + 50, Y + 65);
- LineTo(X + SIZE - 25, Y + 80);
- LineTo(X + SIZE - 23, Y + 90);
- LineTo(X + SIZE - 13, Y + 92);
- //Левая задняя лапа
- MoveTo(X + 50, Y + 65);
- LineTo(X + 25, Y + 80);
- LineTo(X + 23, Y + 90);
- LineTo(X + 13, Y + 92);
- end;
- end;
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- DrawBug(Image1.Canvas, 0, 0, clBlack);
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement