ISEbd-21_Agliullov.D.A._Air.../AirBomber/AirBomber/AirplaneArrowEngines.cs

27 lines
975 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AirBomber
{
internal class AirplaneArrowEngines : DrawningAirplaneEngines
{
protected override void DrawEngine(Graphics g, Color colorAirplane, RectangleF rectAroundEngine)
{
var x = rectAroundEngine.X + rectAroundEngine.Width / 4;
g.FillPolygon(new SolidBrush(colorAirplane), new PointF[]
{
new PointF(rectAroundEngine.Left, rectAroundEngine.Top + rectAroundEngine.Height / 2),
new PointF(x, rectAroundEngine.Top),
new PointF(x, rectAroundEngine.Bottom),
});
int margin = 2;
g.FillRectangle(new SolidBrush(colorAirplane),
x , rectAroundEngine.Top + margin,
rectAroundEngine.Right - x, rectAroundEngine.Height - margin * 2);
}
}
}