From ed129b7653120f17308e8221d63b94b5cfd14f65 Mon Sep 17 00:00:00 2001 From: RedFox245 Date: Wed, 7 Feb 2024 16:53:44 +0400 Subject: [PATCH] =?UTF-8?q?=D1=80=D0=B8=D1=81=D1=83=D0=BD=D0=BE=D0=BA=20?= =?UTF-8?q?=D0=B3=D0=BE=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Seaplane/DrawingSeaplane.cs | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/Seaplane/DrawingSeaplane.cs b/Seaplane/DrawingSeaplane.cs index 82919f7..bb2b596 100644 --- a/Seaplane/DrawingSeaplane.cs +++ b/Seaplane/DrawingSeaplane.cs @@ -155,7 +155,55 @@ public class DrawingSeaplane return; } + Pen pen = new(Color.Black); + Pen additionalpen = new(EntitySeaplane.AdditionalColor); + + + //корпус гидросамолета + Brush br = new SolidBrush(EntitySeaplane.BodyColor); + g.FillRectangle(br, _startPosX.Value, _startPosY.Value + 20, 100, 20); + g.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 20, 100, 20); + + //крыло + Brush darkBrush = new SolidBrush(Color.Black); + g.FillRectangle(darkBrush, _startPosX.Value + 27, _startPosY.Value + 29, 40, 3); + + //хвостовое крыло + g.DrawLine(pen, _startPosX.Value, _startPosY.Value + 20, _startPosX.Value, _startPosY.Value); + g.DrawLine(pen, _startPosX.Value, _startPosY.Value, _startPosX.Value + 20, _startPosY.Value + 20); + + //заднее поперечное крыло + Brush additionalBrush = new SolidBrush(EntitySeaplane.AdditionalColor); + g.FillEllipse(darkBrush, _startPosX.Value - 7, _startPosY.Value + 15, 20, 5); + + //нос самолёта + g.DrawLine(pen, _startPosX.Value + 100, _startPosY.Value + 20, _startPosX.Value + 130, _startPosY.Value + 30); + g.DrawLine(pen, _startPosX.Value + 100, _startPosY.Value + 40, _startPosX.Value + 130, _startPosY.Value + 30); + g.DrawLine(pen, _startPosX.Value + 130, _startPosY.Value + 30, _startPosX.Value + 100, _startPosY.Value + 30); + + //задние шасси + g.DrawLine(pen, _startPosX.Value + 21, _startPosY.Value + 40, _startPosX.Value + 21, _startPosY.Value + 45); + g.FillEllipse(darkBrush, _startPosX.Value + 15, _startPosY.Value + 45, 6, 6); + g.FillEllipse(darkBrush, _startPosX.Value + 21, _startPosY.Value + 45, 6, 6); + + //переднее шасси + g.DrawLine(pen, _startPosX.Value + 90, _startPosY.Value + 40, _startPosX.Value + 90, _startPosY.Value + 45); + g.FillEllipse(darkBrush, _startPosX.Value + 87, _startPosY.Value + 45, 6, 6); + + // поплавки + if (EntitySeaplane.Floats) + { + Brush br2 = new SolidBrush(Color.Red); + g.FillRectangle(br2, _startPosX.Value + 10, _startPosY.Value + 48, 90, 5); + } + + // надувная лодка + if (EntitySeaplane.InflatableBoat) + { + g.FillRectangle(additionalBrush, _startPosX.Value + 38, _startPosY.Value + 38, 22, 8); + + } } }