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:
parent
9374f2c9f7
commit
27946ba063
1 changed files with 10 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue