protected override void Redraw(ImageManager imgManager) { if (!ValueManager.IsChanged(ID.Top) && !ValueManager.IsChanged(ID.Bot) && !ForceUpdate) { return; } ImageRenderer render = new ImageRenderer(imgManager.GetImageObject(DefaultImage, DeckType)); string top = ValueManager[ID.Top]; string bot = ValueManager[ID.Bot]; if (((top == KorrySettings.TopState && !KorrySettings.ShowTopNonZero) || (KorrySettings.ShowTopNonZero && ValueNonZero(top))) && !string.IsNullOrEmpty(KorrySettings.TopImage)) { render.DrawImage(imgManager.GetImageObject(KorrySettings.TopImage, DeckType), KorrySettings.GetRectangleTop()); } string testValue = bot; if (KorrySettings.UseOnlyTopAddr) { testValue = top; } if (((testValue == KorrySettings.BotState && !KorrySettings.ShowBotNonZero) || (KorrySettings.ShowBotNonZero && ValueNonZero(testValue))) && !string.IsNullOrEmpty(KorrySettings.BotImage)) { render.DrawImage(imgManager.GetImageObject(KorrySettings.BotImage, DeckType), KorrySettings.GetRectangleBot()); } DrawImage = render.RenderImage64(); IsRawImage = true; NeedRedraw = true; render.Dispose(); }
protected virtual void RenderDefaultImage(ImageManager imgManager) { ImageRenderer render = new ImageRenderer(imgManager.GetImageObject(KorrySettings.DefaultImage, DeckType)); if (!string.IsNullOrEmpty(KorrySettings.TopImage)) { render.DrawImage(imgManager.GetImageObject(KorrySettings.TopImage, DeckType), KorrySettings.GetRectangleTop()); } if (!string.IsNullOrEmpty(KorrySettings.BotImage)) { render.DrawImage(imgManager.GetImageObject(KorrySettings.BotImage, DeckType), KorrySettings.GetRectangleBot()); } DefaultImageRender = render.RenderImage64(); render.Dispose(); }