// drawarea = Panel and aktTab = latest Index
float x0 = drawarea[aktTab].Width / 2, y0 = drawarea[aktTab].Height / 2, x1, y1;
for (double i = 1; i < 8; i++)
{
double winkel1 = Math.PI / 2 - i * 2 * Math.PI / 8;
x1 = (float)(x0 + drawarea[aktTab].Width * 1 * Math.Cos(winkel1));
y1 = (float)(y0 - drawarea[aktTab].Width * 1 * Math.Sin(winkel1));
grafik.DrawLine(new Pen(Color.Black), x1, y1, drawarea[aktTab].Width - x1, drawarea[aktTab].Height - y1);
}
|