Пример #1
0
        private void ReloadGrid(FieldItemLayer layer, int topX, int topY)
        {
            var transparency = TR_Transparency.Value / 100d;
            var t            = ((int)(0xFF * transparency) << 24) | 0x00FF_FFFF;

            PB_Acre.Image = FieldItemSpriteDrawer.GetBitmapLayerAcre(layer, topX, topY, AcreScale, Scale1, ScaleX, ScaleAcre, t);
        }
Пример #2
0
        private void Menu_SavePNG_Click(object sender, EventArgs e)
        {
            var pb = WinFormsUtil.GetUnderlyingControl <PictureBox>(sender);

            if (pb?.Image == null)
            {
                WinFormsUtil.Alert(MessageStrings.MsgNoPictureLoaded);
                return;
            }

            const string name = "map";
            var          bmp  = FieldItemSpriteDrawer.GetBitmapItemLayer(Map.Items.Layer1);

            using var sfd = new SaveFileDialog
                  {
                      Filter   = "png file (*.png)|*.png|All files (*.*)|*.*",
                      FileName = $"{name}.png",
                  };
            if (sfd.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            bmp.Save(sfd.FileName, ImageFormat.Png);
        }
Пример #3
0
        private void ReloadMap()
        {
            var transparency = TR_Transparency.Value / 100d;
            var t            = ((int)(0xFF * transparency) << 24) | 0x00FF_FFFF;

            PB_Map.Image = FieldItemSpriteDrawer.GetBitmapLayer(Layer, X, Y, Map, MapReticle, t);
        }
Пример #4
0
 private void ReloadGrid(FieldItemLayer layer, int topX, int topY)
 {
     PB_Acre.Image = FieldItemSpriteDrawer.GetBitmapLayerAcre(layer, topX, topY, AcreScale, Scale1, ScaleX, ScaleAcre);
 }
Пример #5
0
 private void ReloadMap()
 {
     PB_Map.Image = FieldItemSpriteDrawer.GetBitmapLayer(Layer, X, Y, Map, MapReticle);
 }
Пример #6
0
 private Bitmap GetMapWithReticle(int topX, int topY, int t, FieldItemLayer layer)
 {
     return(FieldItemSpriteDrawer.GetBitmapItemLayer(layer, topX, topY, PixelsItemMap, MapReticle, t));
 }
Пример #7
0
        private Bitmap GetLayerAcre(int topX, int topY, int t)
        {
            var layer = Map.CurrentLayer;

            return(FieldItemSpriteDrawer.GetBitmapItemLayerAcre(layer, topX, topY, AcreScale, PixelsItemAcre1, PixelsItemAcreX, ScaleAcre, t));
        }