I’ve been looking around on Google for quite some time and cannot seem to find a solution to my problem.
The problem is with painting a bitmap onto a panel. For some strange reason the entire bitmap seems to have an offset towards the upper-left of the panel.Which makes it confusing when building the map. As an extra note the bitmap was being painted on a panel larger than itself. (e.g. bitmap.dimensions == 64×64 and panel.dimensions == 512×512).
private void redrawCityPanel()
{
Image cityImage = this.cityBitmap;
Graphics panel_CityGraphics = this.panel_City.CreateGraphics();
panel_CityGraphics.Clear(this.panel_City.BackColor);
panel_CityGraphics.InterpolationMode = InterpolationMode.NearestNeighbor;
panel_CityGraphics.DrawImage(cityImage, panel_City.DisplayRectangle);
}
Sorry about the confusion. I would post images but I haven’t earned enough points.
All I needed to do was set the pixel offset mode.