private void DrawStartMarkersBittah(Graphics gfx, Rectangle fullImage, Rectangle previewImage)
{
foreach (var w in _wayPoints.Where(w => w.Number < 8)) {
var t = _tiles.GetTile(w.Tile);
var center = new Point(t.Dx * Drawable.TileWidth / 2, (t.Dy - t.Z) * Drawable.TileHeight / 2);
// project to preview dimensions
double pctFullX = (center.X - fullImage.Left) / (double)fullImage.Width;
double pctFullY = (center.Y - fullImage.Top) / (double)fullImage.Height;
Point dest = new Point((int)(pctFullX * previewImage.Width), (int)(pctFullY * previewImage.Height));
var img = Resources.ResourceManager.GetObject("bittah_marker_" + (w.Number + 1)) as Image;
if (img != null) {
// center marker img
dest.Offset(-img.Width / 2, -img.Height / 2);
// draw it
gfx.DrawImage(img, dest);
}
}
}