diff --git a/src/Avalonia.Base/Media/Imaging/RenderTargetBitmap.cs b/src/Avalonia.Base/Media/Imaging/RenderTargetBitmap.cs
index d638630bb1..5824a2b994 100644
--- a/src/Avalonia.Base/Media/Imaging/RenderTargetBitmap.cs
+++ b/src/Avalonia.Base/Media/Imaging/RenderTargetBitmap.cs
@@ -62,10 +62,16 @@ namespace Avalonia.Media.Imaging
return factory.CreateRenderTargetBitmap(size, dpi);
}
- public DrawingContext CreateDrawingContext()
+ ///
+ /// Creates a for drawing to the .
+ ///
+ /// Indicates if the image should be cleared.
+ /// The drawing context.
+ public DrawingContext CreateDrawingContext(bool clear = true)
{
var platform = PlatformImpl.Item.CreateDrawingContext();
- platform.Clear(Colors.Transparent);
+ if(clear)
+ platform.Clear(Colors.Transparent);
return new PlatformDrawingContext(platform);
}