mirror of
https://github.com/kwsch/NHSE.git
synced 2026-09-27 04:19:36 -05:00
Allow toggling png export
why not; I guess if you don't want the items/reticle and want dat clean "here's my terraforming work"
This commit is contained in:
@@ -456,10 +456,21 @@ private void Menu_SavePNG_Click(object sender, EventArgs e)
|
||||
if (sfd.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
var img = (Bitmap)PB_Map.BackgroundImage.Clone();
|
||||
using var gfx = Graphics.FromImage(img);
|
||||
gfx.DrawImage(PB_Map.Image, new Point(0, 0));
|
||||
img.Save(sfd.FileName, ImageFormat.Png);
|
||||
if (!Menu_SavePNGTerrain.Checked)
|
||||
{
|
||||
PB_Map.Image.Save(sfd.FileName, ImageFormat.Png);
|
||||
}
|
||||
else if (!Menu_SavePNGItems.Checked)
|
||||
{
|
||||
PB_Map.BackgroundImage.Save(sfd.FileName, ImageFormat.Png);
|
||||
}
|
||||
else
|
||||
{
|
||||
var img = (Bitmap)PB_Map.BackgroundImage.Clone();
|
||||
using var gfx = Graphics.FromImage(img);
|
||||
gfx.DrawImage(PB_Map.Image, new Point(0, 0));
|
||||
img.Save(sfd.FileName, ImageFormat.Png);
|
||||
}
|
||||
}
|
||||
|
||||
private void PB_Map_MouseDown(object sender, MouseEventArgs e) => ClickMapAt(e, true);
|
||||
|
||||
Reference in New Issue
Block a user