示例#1
0
        private void mnuCopyImageSub_Click(object sender, EventArgs e)
        {
            Sprite.SubSprite subSprite = spriteEditor.GetSubSprite;
            Bitmap           toSave    = new Bitmap(subSprite.WidthInPixels,
                                                    subSprite.HeightInPixels,
                                                    PixelFormat.Format32bppArgb);

            subSprite.RenderSubSprite(toSave, 0, 0, 1, false);
            Clipboard.SetImage(toSave);
            toSave.Dispose();
        }
示例#2
0
 private void mnuSavePNGSub_Click(object sender, EventArgs e)
 {
     if (dlgSavePNG.ShowDialog() == DialogResult.OK)
     {
         Sprite.SubSprite subSprite = spriteEditor.GetSubSprite;
         Bitmap           toSave    = new Bitmap(subSprite.WidthInPixels,
                                                 subSprite.HeightInPixels,
                                                 PixelFormat.Format32bppArgb);
         subSprite.RenderSubSprite(toSave, 0, 0, 1, false);
         toSave.Save(dlgSavePNG.FileName, ImageFormat.Png);
         toSave.Dispose();
     }
 }
示例#3
0
 private void cboSubSprite_SelectedIndexChanged(object sender, EventArgs e)
 {
     updating            = true;
     subSprite           = sprite.GetSubSprite(cboSubSprite.SelectedIndex);
     nudXOff.Value       = subSprite.OffsetX;
     nudYOff.Value       = subSprite.OffsetY;
     lblWidth.Text       = subSprite.WidthInPixels.ToString() + " pixels";
     lblHeight.Text      = subSprite.HeightInPixels.ToString() + " pixels";
     lblGfxAddress.Text  = "0x" + subSprite.tileSet.Address.ToString("X");
     lblTileAddress.Text = "0x" + (subSprite.tileSet.Address +
                                   (subSprite.Tile << 5)).ToString("X") + " (tile 0x" +
                           subSprite.Tile.ToString("X") + ")";
     lblPalAddress.Text = "0x" + subSprite.pal.Address.ToString("X");
     UpdateStuff();
     updating = false;
 }