示例#1
0
        public void Dispose()
        {
            if (!IsRefreshable)
            {
                return;
            }

            if (StandardBitmap != null)
            {
                StandardBitmap.Dispose();
                StandardBitmap = null;
            }
            if (TransparentBitmap != null)
            {
                TransparentBitmap.Dispose();
                TransparentBitmap = null;
            }
            if (TextureBitmap != null)
            {
                TextureBitmap.Dispose();
                TextureBitmap = null;
            }

            DisposeCache();
            DisposeOpaqueCache();

            DisposeSourceCache();
            DisposeOpaqueSourceCache();

            DisposeTextureCache();
        }
示例#2
0
 private void CreateStandardImage(string PaletteDataPath)
 {
     StandardBitmap = SetPaletteColors(BitmapExtensions.LoadBitmap(Filename), PaletteDataPath);
     if (StandardBitmap.Palette != null && StandardBitmap.Palette.Entries.Length > 0)
     {
         StandardBitmap.MakeTransparent(StandardBitmap.Palette.Entries[0]);
     }
     else
     {
         StandardBitmap.MakeTransparent(SystemColor.FromArgb(0xff00ff));
     }
 }
示例#3
0
        private void CreateTransparentImage()
        {
            TransparentBitmap = StandardBitmap.Clone(new Rectangle(0, 0, StandardBitmap.Width, StandardBitmap.Height), PixelFormat.Format32bppArgb);

            if (TransparentBitmap.Palette != null && TransparentBitmap.Palette.Entries.Length > 0)
            {
                TransparentBitmap.MakeTransparent(TransparentBitmap.Palette.Entries[0]);
            }
            else
            {
                TransparentBitmap.MakeTransparent(SystemColor.FromArgb(0xff00ff));
            }

            TransparentBitmap = SetImageOpacity(TransparentBitmap, SemiOpacity);
        }