Ejemplo n.º 1
0
        /// <inheritdoc />
        public virtual void PerformRender(Rectangle rectangle, IEnumerable <BrushRenderTarget> renderTargets)
        {
            lock (_disposeLock)
            {
                // Can happen during surface change
                if (IsDisposed)
                {
                    return;
                }

                if (RenderedRectangle != rectangle || RenderedScale != Scale)
                {
                    Bitmap = null;
                }

                RenderedRectangle = rectangle;
                RenderedScale     = Scale;
                RenderedTargets.Clear();

                if (Bitmap == null)
                {
                    CreateBitmap(RenderedRectangle);
                }

                if (_sampleSizeSetting.Value == 1)
                {
                    TakeCenter(renderTargets);
                }
                else
                {
                    TakeSamples(renderTargets);
                }
            }
        }
Ejemplo n.º 2
0
        /// <inheritdoc />
        public virtual void PerformRender(Rectangle rectangle, IEnumerable <BrushRenderTarget> renderTargets)
        {
            if (RenderedRectangle != rectangle || RenderedScale != Scale)
            {
                Bitmap = null;
            }

            RenderedRectangle = rectangle;
            RenderedScale     = Scale;
            RenderedTargets.Clear();

            if (Bitmap == null)
            {
                CreateBitmap(RenderedRectangle);
            }

            if (_sampleSizeSetting.Value == 1)
            {
                TakeCenter(renderTargets);
            }
            else
            {
                TakeSamples(renderTargets);
            }
        }