1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-03 03:30:06 +00:00

D2D: Pass the clearImage flag to the BitmapData backup image

https://forum.juce.com/t/the-juce-8-preview-branch-is-available-now/60950/123
This commit is contained in:
Matt Gonzalez 2024-05-09 19:17:23 -07:00 committed by Anthony Nicholls
parent 9e9da250eb
commit dfa94981e4

View file

@ -266,7 +266,7 @@ void Direct2DPixelData::initialiseBitmapData (Image::BitmapData& bitmap, int x,
// If the user doesn't want to read from the image, then we may need to create a blank image that they can write to.
if (! backup.isValid())
backup = Image { SoftwareImageType{}.create (pixelFormat, width, height, false) };
backup = Image { SoftwareImageType{}.create (pixelFormat, width, height, clearImage) };
// Redirect the BitmapData to our backup software image.
backup.getPixelData()->initialiseBitmapData (bitmap, x, y, mode);