Reputation: 275
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
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