user3200169
user3200169

Reputation: 275

How can i change the triangle size to be smaller and change it's location?

private void pictureBox1_Paint(object sender, PaintEventArgs e)
        {
            Point[] points2 = { new Point(100, 100), new Point(200, 100), new Point(150, 10) };
            e.Graphics.FillPolygon(new SolidBrush(Color.Red), points2);
        }

I want to change the triangle location and size. When i change one of the values it's just rotating it.

Upvotes: 2

Views: 122

Answers (1)

Sriram Sakthivel
Sriram Sakthivel

Reputation: 73442

Download Triangle.cs, which is what .Net framework uses. Then just make use of BuildTrianglePoints method and pass bounds to create your triangle.

Upvotes: 1

Related Questions