прорисовка основных элементов

This commit is contained in:
xom9kxom9k 2024-02-27 23:16:07 +04:00
parent 9ddc7ad36f
commit c651c7959a

View File

@ -179,56 +179,67 @@ public class DrawningAntiAircraftGun
}
Pen pen = new(Color.Black);
Brush MainBrush = new SolidBrush(EntityAntiAircraftGun.BodyColor);
Brush additionalBrush = new SolidBrush(EntityAntiAircraftGun.AdditionalColor);
//основание
g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value + 45, 20, 20);
g.DrawEllipse(pen, _startPosX.Value + 95, _startPosY.Value + 45, 20, 20);
g.DrawEllipse(pen, _startPosX.Value + 10, _startPosY.Value + 75, 30, 30);
g.DrawEllipse(pen, _startPosX.Value + 100, _startPosY.Value + 75, 30, 30);
g.DrawRectangle(pen, _startPosX.Value + 25, _startPosY.Value + 75, 90, 30);
g.DrawRectangle(pen, _startPosX.Value + 5, _startPosY.Value + 45, 100, 20);
g.FillRectangle(MainBrush, _startPosX.Value + 5, _startPosY.Value + 45, 100, 20);
//границы ЦВЕТ
Brush brDarkSlateGray = new SolidBrush(EntityAntiAircraftGun.BodyColor);
g.FillRectangle(brDarkSlateGray, _startPosX.Value + 35, _startPosY.Value + 40, 35, 30);
g.FillEllipse(brDarkSlateGray, _startPosX.Value + 10, _startPosY.Value + 75, 30, 30);
g.FillEllipse(brDarkSlateGray, _startPosX.Value + 100, _startPosY.Value + 75, 30, 30);
g.FillRectangle(brDarkSlateGray, _startPosX.Value + 25, _startPosY.Value + 75, 90, 30);
g.FillEllipse(MainBrush, _startPosX.Value, _startPosY.Value + 45, 20, 20);
g.FillEllipse(MainBrush, _startPosX.Value + 95, _startPosY.Value + 45, 20, 20);
// границы арт. установки
g.DrawRectangle(pen, _startPosX.Value + 35, _startPosY.Value + 40, 35, 30);
g.DrawRectangle(pen, _startPosX.Value + 10, _startPosY.Value + 65, 120, 13);
g.DrawRectangle(pen, _startPosX.Value + 5, _startPosY.Value + 35, 80, 10);
g.FillRectangle(MainBrush, _startPosX.Value + 5, _startPosY.Value + 35, 80, 10);
//нижние катки ЦВЕТ
Brush brDimGray = new SolidBrush(Color.SlateGray);
g.FillEllipse(brDimGray, _startPosX.Value + 40, _startPosY.Value + 90, 15, 15);
g.FillEllipse(brDimGray, _startPosX.Value + 55, _startPosY.Value + 90, 15, 15);
g.FillEllipse(brDimGray, _startPosX.Value + 70, _startPosY.Value + 90, 15, 15);
g.FillEllipse(brDimGray, _startPosX.Value + 85, _startPosY.Value + 90, 15, 15);
//катки
//нижние катки ОТРИСОВКА
g.DrawEllipse(pen, _startPosX.Value + 40, _startPosY.Value + 90, 15, 15);
g.DrawEllipse(pen, _startPosX.Value + 55, _startPosY.Value + 90, 15, 15);
g.DrawEllipse(pen, _startPosX.Value + 70, _startPosY.Value + 90, 15, 15);
g.DrawEllipse(pen, _startPosX.Value + 85, _startPosY.Value + 90, 15, 15);
g.DrawEllipse(pen, _startPosX.Value + 5, _startPosY.Value + 45, 20, 20);
g.DrawEllipse(pen, _startPosX.Value + 90, _startPosY.Value + 45, 20, 20);
//Большие катки ЦВЕТ
Brush brSlateGray = new SolidBrush(Color.SlateGray);
g.FillEllipse(brSlateGray, _startPosX.Value + 13, _startPosY.Value + 78, 24, 24);
g.FillEllipse(brSlateGray, _startPosX.Value + 103, _startPosY.Value + 78, 24, 24);
//Большие катки ОТРИСОВКА
g.DrawEllipse(pen, _startPosX.Value + 13, _startPosY.Value + 78, 24, 24);
g.DrawEllipse(pen, _startPosX.Value + 103, _startPosY.Value + 78, 24, 24);
g.FillEllipse(MainBrush, _startPosX.Value + 5, _startPosY.Value + 45, 20, 20);
g.FillEllipse(MainBrush, _startPosX.Value, _startPosY.Value + 45, 20, 20);
g.FillRectangle(brDarkSlateGray, _startPosX.Value + 10, _startPosY.Value + 65, 120, 13);
g.DrawEllipse(pen, _startPosX.Value + 30, _startPosY.Value + 55, 10, 10);
g.FillEllipse(MainBrush, _startPosX.Value + 30, _startPosY.Value + 55, 10, 10);
g.DrawEllipse(pen, _startPosX.Value + 45, _startPosY.Value + 55, 10, 10);
g.FillEllipse(MainBrush, _startPosX.Value, _startPosY.Value + 55, 10, 10);
g.DrawEllipse(pen, _startPosX.Value + 60, _startPosY.Value + 55, 10, 10);
g.FillEllipse(MainBrush, _startPosX.Value, _startPosY.Value + 55, 10, 10);
g.DrawEllipse(pen, _startPosX.Value + 75, _startPosY.Value + 55, 10, 10);
g.FillEllipse(MainBrush, _startPosX.Value, _startPosY.Value + 55, 10, 10);
//tower_gin
if (EntityAntiAircraftGun.Tower)
{
g.DrawRectangle(pen, _startPosX.Value + 50, _startPosY.Value + 20, 50, 5);
g.FillRectangle(MainBrush, _startPosX.Value + 50, _startPosY.Value + 20, 50, 5);
g.DrawRectangle(pen, _startPosX.Value + 25, _startPosY.Value + 15, 30, 20);
g.FillRectangle(MainBrush, _startPosX.Value + 25, _startPosY.Value + 15, 30, 20);
g.FillEllipse(additionalBrush, _startPosX.Value + 36, _startPosY.Value + 35, 50, 30);
g.FillRectangle(additionalBrush, _startPosX.Value + 35, _startPosY.Value + 36, 20, 29);
g.FillRectangle(additionalBrush, _startPosX.Value + 70, _startPosY.Value + 45, 60, 5);
g.FillEllipse(additionalBrush, _startPosX.Value + 123, _startPosY.Value + 42, 20, 10);
}
//зенитка
if (EntityAntiAircraftGun.Radar)
{
g.FillRectangle(additionalBrush, _startPosX.Value + 10, _startPosY.Value + 45, 20, 20);
g.FillPolygon(additionalBrush, new Point[]
{
new Point(_startPosX.Value + 10, _startPosY.Value + 15), new Point(_startPosX.Value + 10, _startPosY.Value + 65),
new Point(_startPosX.Value + 30, _startPosY.Value + 65), new Point(_startPosX.Value + 30, _startPosY.Value + 45),
new Point(_startPosX.Value + 10, _startPosY.Value + 15)
});
g.FillEllipse(additionalBrush, _startPosX.Value + 10, _startPosY.Value + 5, 10, 30);
g.FillRectangle(additionalBrush, _startPosX.Value + 20, _startPosY.Value + 15, 20, 5);
g.FillRectangle(additionalBrush, _startPosX.Value + 20, _startPosY.Value + 25, 15, 5);
}