Помогите нарисовать
Помогите нарисовать , такое в дельфи , чтоб в последствии каждое поле я мог заливкой разной залить , то есть стены принтус , пол и тд .
Есть координаты написанные в С#
Код:
protected override void OnPaint(PaintEventArgs e)
{
Graphics g = e.Graphics;
Pen pen = new Pen(Color.Black);
g.DrawRectangle(pen, 0, 0, 400, 300);
g.FillRectangle(Brushes.White, new Rectangle(0, 0, 400, 300));
#region Стены
Point[] points = {new Point(0, 5), new Point(0, 295), new Point(100, 215), new Point(100, 75)};
g.FillPolygon(wall, points);
Point[] points2 = {new Point(300, 75), new Point(300, 215), new Point(100, 215), new Point(100, 75),
new Point(150, 75), new Point (150, 160), new Point(250, 160), new Point(250, 110),
new Point(150, 110), new Point(150, 75)};
g.FillPolygon(wall, points2);
Point[] points3 = {new Point(300, 215), new Point(350, 255), new Point(350, 85), new Point(400, 55), new Point(400, 5), new Point(300, 75)};
g.FillPolygon(wall, points3);
#endregion
#region Кайма
Point[] points4 = { new Point(0, 0), new Point(0, 5), new Point(100, 75), new Point(100, 70) };
g.FillPolygon(kaima, points4);
Point[] points5 = { new Point(100, 70), new Point(100, 75), new Point(300, 75), new Point(300, 70) };
g.FillPolygon(kaima, points5);
Point[] points6 = { new Point(300, 70), new Point(300, 75), new Point(400, 5), new Point(400, 0) };
g.FillPolygon(kaima, points6);
#endregion
#region Плинтус
Point[] points7 = { new Point(0, 295), new Point(0, 300), new Point(100, 220), new Point(100, 215) };
g.FillPolygon(plintus, points7);
Point[] points8 = { new Point(100, 215), new Point(100, 220), new Point(300, 220), new Point(300, 215) };
g.FillPolygon(plintus, points8);
Point[] points9 = { new Point(300, 220), new Point(300, 215), new Point(350, 255), new Point(350, 260) };
g.FillPolygon(plintus, points9);
#endregion
#region Потолок
Point[] points10 = { new Point(0, 0), new Point(400, 0), new Point(300, 70), new Point(100, 70) };
g.FillPolygon(potolok, points10);
#endregion
#region Пол
Point[] points11 = { new Point(0, 300), new Point(100, 220), new Point(300, 220), new Point(400, 300) };
g.FillPolygon(pol, points11);
#endregion
#region Контуры стен
g.DrawRectangle(pen, new Rectangle(100, 70, 200, 150));
g.DrawLine(pen, 0, 0, 100, 70);
g.DrawLine(pen, 400, 0, 300, 70);
g.DrawLine(pen, 400, 300, 300, 220);
g.DrawLine(pen, 0, 300, 100, 220);
#endregion
#region Контур двери
g.DrawLine(pen, 350, 85, 350, 260);
g.DrawLine(pen, 350, 85, 400, 55);
#endregion
#region Контур окна
g.DrawRectangle(pen, new Rectangle(150, 110, 100, 50));
g.DrawLine(pen, 183, 110, 183, 160);
g.DrawLine(pen, 216, 110, 216, 160);
#endregion
#region Контур каймы
g.DrawLine(pen, 0, 5, 100, 75);
g.DrawLine(pen, 100, 75, 300, 75);
g.DrawLine(pen, 300, 75, 400, 5);
#endregion
#region Контур плинтуса
g.DrawLine(pen, 0, 295, 100, 215);
g.DrawLine(pen, 100, 215, 300, 215);
g.DrawLine(pen, 300, 215, 350, 255);
#endregion
#region Длины
g.DrawString("1.5", new Font("Arial", 8), Brushes.Black, 193, 95);
g.DrawString("1", new Font("Arial", 8), Brushes.Black, 137, 130);
g.DrawString("2", new Font("Arial", 8), Brushes.Black, 337, 145);
g.DrawString("1", new Font("Arial", 8), Brushes.Black, 367, 54);
g.DrawString("5", new Font("Arial", 8), Brushes.Black, 60, 255);
g.DrawString("3", new Font("Arial", 8), Brushes.Black, 193, 200);
g.DrawString("2.5", new Font("Arial", 8), Brushes.Black, 100, 150);
Надо такое же но на дельфи  может хоть кусочек скажите а я дальше сам ) или спрошу еще че не пойму 
Последний раз редактировалось guver, 28.04.2010 в 23:00.
|