private void DrawArrow(Graphics graphics, float x, float y, float rowHeight, Color color, bool filled)
{
const float horShift = 4;
const float verShift = 3;
float height = rowHeight - verShift * 2;
float width = height / 2;
var points = new[]
{
new PointF(x + horShift, y + verShift),
new PointF(x + horShift + width, y + verShift + height/2),
new PointF(x + horShift, y + verShift + height),
new PointF(x + horShift, y + verShift)
};
if (filled)
{
using (var solidBrush = new SolidBrush(color))
graphics.FillPolygon(solidBrush, points);
}
else
{
using (var pen = new Pen(color))
graphics.DrawPolygon(pen, points);
}
}