Beispiel #1
0
        RenderedBitmap RenderSpellIcon(int index)
        {
            var settings = UserSettingsManager.Instance.Settings;

            if (spellIconPalette == null)
            {
                spellIconPalette = GetColorPalette(settings.IconDataFile, settings.SpellPaletteFile);
            }

            if (spellIconImage == null)
            {
                spellIconImage = GetEpfImage(settings.IconDataFile, settings.SpellIconFile);
            }

            if (spellIconPalette == null || spellIconImage == null)
            {
                return(null);
            }

            if (index >= spellIconImage.FrameCount)
            {
                return(null);
            }

            var frame  = spellIconImage.GetFrameAt(index);
            var bitmap = RenderManager.Instance.Render(frame, spellIconPalette);

            return(bitmap);
        }
Beispiel #2
0
        public void ReloadIcons()
        {
            var settings = UserSettingsManager.Instance.Settings;

            skillIconPalette = GetColorPalette(settings.IconDataFile, settings.SkillPaletteFile);
            spellIconPalette = GetColorPalette(settings.IconDataFile, settings.SpellPaletteFile);

            skillIconImage = GetEpfImage(settings.IconDataFile, settings.SkillIconFile);
            spellIconImage = GetEpfImage(settings.IconDataFile, settings.SpellIconFile);
        }
Beispiel #3
0
        public IEnumerable<RenderedBitmap> Render(EpfImage image, ColorPalette palette)
        {
            if (image == null)
            throw new ArgumentNullException("image");

              if (palette == null)
            throw new ArgumentNullException("palette");

              foreach (var frame in image.Frames)
            yield return Render(frame, palette);
        }
Beispiel #4
0
        public IEnumerable <RenderedBitmap> Render(EpfImage image, ColorPalette palette)
        {
            if (image == null)
            {
                throw new ArgumentNullException("image");
            }

            if (palette == null)
            {
                throw new ArgumentNullException("palette");
            }

            foreach (var frame in image.Frames)
            {
                yield return(Render(frame, palette));
            }
        }
Beispiel #5
0
        RenderedBitmap RenderSpellIcon(int index)
        {
            var settings = UserSettingsManager.Instance.Settings;

              if (spellIconPalette == null)
            spellIconPalette = GetColorPalette(settings.IconDataFile, settings.SpellPaletteFile);

              if (spellIconImage == null)
            spellIconImage = GetEpfImage(settings.IconDataFile, settings.SpellIconFile);

              if (spellIconPalette == null || spellIconImage == null)
            return null;

              if (index >= spellIconImage.FrameCount)
            return null;

              var frame = spellIconImage.GetFrameAt(index);
              var bitmap = RenderManager.Instance.Render(frame, spellIconPalette);

              return bitmap;
        }
Beispiel #6
0
        public void ReloadIcons()
        {
            var settings = UserSettingsManager.Instance.Settings;

              skillIconPalette = GetColorPalette(settings.IconDataFile, settings.SkillPaletteFile);
              spellIconPalette = GetColorPalette(settings.IconDataFile, settings.SpellPaletteFile);

              skillIconImage = GetEpfImage(settings.IconDataFile, settings.SkillIconFile);
              spellIconImage = GetEpfImage(settings.IconDataFile, settings.SpellIconFile);
        }