protected override void OnPaint(PaintEventArgs e)
{
Matrix m = e.Graphics.Transform.Clone();
m.Translate(m_translateX, m_translateY);
m.Scale(m_scale, m_scale);
m.Rotate(m_rotateAngle);
e.Graphics.Transform = m;
UpdateCellLocations(e.Graphics);
PaintGrid(e.Graphics);
PaintCells(e.Graphics);
PaintHighlightedCell(e.Graphics);
if (m_showDebug)
{
PaintDebug(e.Graphics);
}
PaintBorder(e.Graphics);
}