private Point MouseToCell(int x, int y)
{
Point p = new Point();
int cx = (int)((double)x / _bitmap.Width * _region.Width);
int cy = (int)((double)(y - layerLabel.Height - layerLabel.Top) / _bitmap.Height * _region.Height);
if (cx < 0 || cx >= _region.Width)
p.X = -1;
else
p.X = cx;
if (cy < 0 || cy >= _region.Height)
p.Y = -1;
else
p.Y = cy;
return p;
}