/// <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); } } }
/// <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); } }