protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
Graphics myGraphics = e.Graphics;
Pen myPen = new Pen(Color.Black, 1.0f);
GraphicsPath gp = new GraphicsPath();
Matrix RotationTransform;
float centerX = this.Size.Width / 2f;
float centerY = this.Size.Height / 2f;
gp.AddPolygon(new PointF[] {
new PointF(centerX, centerY - 5),
new PointF(centerX-5, centerY + 5),
new PointF(centerX+5, centerY + 5)
});
RotationTransform = new Matrix(1, 0, 0, 1, 0, 0); // rotation matrix
PointF RotationPoint = new PointF(centerX, centerY); // rotation point
RotationTransform.RotateAt(heading, RotationPoint);
gp.Transform(RotationTransform);
myGraphics.FillPath(myPen.Brush, gp);
myGraphics.DrawPath(myPen, gp);
myPen.Dispose();
gp.Dispose();
}