Esempio n. 1
0
        public override void OnDraw(Graphics2D graphics2D)
        {
            if (!hasBeenLoaded)
            {
                if (Url.StartsWith("http"))
                {
                    WebCache.RetrieveImageSquenceAsync(imageSequence, Url);
                }

                hasBeenLoaded = true;
            }
            base.OnDraw(graphics2D);
        }
        public override void OnDraw(Graphics2D graphics2D)
        {
            if (!hasBeenLoaded)
            {
                if (ImageUrl.StartsWith("http"))
                {
                    WebCache.RetrieveImageSquenceAsync(imageSequence, ImageUrl, () =>
                    {
                        this.MinStretchOrFitHorizontal(20, imageSequence.Width);
                        UiThread.RunOnIdle(() =>
                        {
                            if (aggRenderer.RootWidget.Parents <MarkdownWidget>().FirstOrDefault() is MarkdownWidget markdownWidget)
                            {
                                markdownWidget.Width = markdownWidget.Width + 1;
                            }
                        });
                    });
                }

                hasBeenLoaded = true;
            }

            base.OnDraw(graphics2D);
        }