1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Effects: Use compatible image type for DragAndDropContainer

Co-authored-by: Matt Gonzalez <matt@echoaudio.com>
This commit is contained in:
Oli 2025-04-15 13:38:51 +01:00
parent 9374f2c9f7
commit 27946ba063

View file

@ -479,7 +479,11 @@ void DragAndDropContainer::startDragging (const var& sourceDescription,
const auto relPos = sourceComponent->getLocalPoint (nullptr, lastMouseDown).toDouble();
const auto clipped = (image.getBounds().toDouble() / scaleFactor).getConstrainedPoint (relPos);
Image fade (Image::SingleChannel, image.getWidth(), image.getHeight(), true);
Image fade (Image::SingleChannel,
image.getWidth(),
image.getHeight(),
true,
*image.getPixelData()->createType());
{
Graphics fadeContext (fade);
@ -495,7 +499,11 @@ void DragAndDropContainer::startDragging (const var& sourceDescription,
fadeContext.fillAll();
}
Image composite (Image::ARGB, image.getWidth(), image.getHeight(), true);
Image composite (Image::ARGB,
image.getWidth(),
image.getHeight(),
true,
*image.getPixelData()->createType());
{
Graphics compositeContext (composite);