Skip to content

Commit 2efd3e0

Browse files
Component: Prevent unnecessary image clearing in createComponentSnapshot
1 parent cea19a9 commit 2efd3e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/juce_gui_basics/components/juce_Component.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1986,7 +1986,7 @@ Image Component::createComponentSnapshot (Rectangle<int> areaToGrab,
19861986
auto w = roundToInt (scaleFactor * (float) r.getWidth());
19871987
auto h = roundToInt (scaleFactor * (float) r.getHeight());
19881988

1989-
Image image (flags.opaqueFlag ? Image::RGB : Image::ARGB, w, h, true, imageType);
1989+
Image image (flags.opaqueFlag ? Image::RGB : Image::ARGB, w, h, ! flags.opaqueFlag, imageType);
19901990

19911991
Graphics g (image);
19921992

0 commit comments

Comments
 (0)