Crtanje poligona ispunjenog nekom bojom
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics obj = CreateGraphics();
/*
Point[] points = new Point[3];
points[0] = new Point(75, 35);
points[1] = new Point(155, 35);
points[2] = new Point(45, 95);
*/
Point[] tackePoligona = {
new Point(30, 60),
new Point(140, 80),
new Point(160, 100),
new Point(90, 120),
new Point(70, 90)
};
SolidBrush brush = new SolidBrush(Color.DodgerBlue);
obj.FillPolygon(brush, tackePoligona);
obj.Dispose();
}
}
}