mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-11 23:54:18 +00:00
Fixes for Quicktime, DrawableComposite.
This commit is contained in:
parent
b709f97739
commit
c583b68cd6
3 changed files with 34 additions and 18 deletions
|
|
@ -22626,6 +22626,7 @@ public:
|
|||
extractor (0),
|
||||
dataHandle (0)
|
||||
{
|
||||
JUCE_AUTORELEASEPOOL
|
||||
bufferList.calloc (256, 1);
|
||||
|
||||
#if JUCE_WINDOWS
|
||||
|
|
@ -22751,6 +22752,9 @@ public:
|
|||
|
||||
~QTAudioReader()
|
||||
{
|
||||
JUCE_AUTORELEASEPOOL
|
||||
checkThreadIsAttached();
|
||||
|
||||
if (dataHandle != 0)
|
||||
DisposeHandle (dataHandle);
|
||||
|
||||
|
|
@ -22760,7 +22764,6 @@ public:
|
|||
extractor = 0;
|
||||
}
|
||||
|
||||
checkThreadIsAttached();
|
||||
DisposeMovie (movie);
|
||||
|
||||
#if JUCE_MAC
|
||||
|
|
@ -22771,6 +22774,7 @@ public:
|
|||
bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer,
|
||||
int64 startSampleInFile, int numSamples)
|
||||
{
|
||||
JUCE_AUTORELEASEPOOL
|
||||
checkThreadIsAttached();
|
||||
bool ok = true;
|
||||
|
||||
|
|
@ -86401,17 +86405,21 @@ void DrawableComposite::render (const Drawable::RenderingContext& context) const
|
|||
// we need to render everything opaquely into a temp buffer, then blend that
|
||||
// with the target opacity...
|
||||
const Rectangle<int> clipBounds (context.g.getClipBounds());
|
||||
Image tempImage (Image::ARGB, clipBounds.getWidth(), clipBounds.getHeight(), true);
|
||||
|
||||
if (! clipBounds.isEmpty())
|
||||
{
|
||||
Graphics tempG (tempImage);
|
||||
tempG.setOrigin (-clipBounds.getX(), -clipBounds.getY());
|
||||
Drawable::RenderingContext tempContext (tempG, context.transform, 1.0f);
|
||||
render (tempContext);
|
||||
}
|
||||
Image tempImage (Image::ARGB, clipBounds.getWidth(), clipBounds.getHeight(), true);
|
||||
|
||||
context.g.setOpacity (context.opacity);
|
||||
context.g.drawImageAt (tempImage, clipBounds.getX(), clipBounds.getY());
|
||||
{
|
||||
Graphics tempG (tempImage);
|
||||
tempG.setOrigin (-clipBounds.getX(), -clipBounds.getY());
|
||||
Drawable::RenderingContext tempContext (tempG, context.transform, 1.0f);
|
||||
render (tempContext);
|
||||
}
|
||||
|
||||
context.g.setOpacity (context.opacity);
|
||||
context.g.drawImageAt (tempImage, clipBounds.getX(), clipBounds.getY());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ public:
|
|||
extractor (0),
|
||||
dataHandle (0)
|
||||
{
|
||||
JUCE_AUTORELEASEPOOL
|
||||
bufferList.calloc (256, 1);
|
||||
|
||||
#if JUCE_WINDOWS
|
||||
|
|
@ -211,6 +212,9 @@ public:
|
|||
|
||||
~QTAudioReader()
|
||||
{
|
||||
JUCE_AUTORELEASEPOOL
|
||||
checkThreadIsAttached();
|
||||
|
||||
if (dataHandle != 0)
|
||||
DisposeHandle (dataHandle);
|
||||
|
||||
|
|
@ -220,7 +224,6 @@ public:
|
|||
extractor = 0;
|
||||
}
|
||||
|
||||
checkThreadIsAttached();
|
||||
DisposeMovie (movie);
|
||||
|
||||
#if JUCE_MAC
|
||||
|
|
@ -231,6 +234,7 @@ public:
|
|||
bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer,
|
||||
int64 startSampleInFile, int numSamples)
|
||||
{
|
||||
JUCE_AUTORELEASEPOOL
|
||||
checkThreadIsAttached();
|
||||
bool ok = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -232,17 +232,21 @@ void DrawableComposite::render (const Drawable::RenderingContext& context) const
|
|||
// we need to render everything opaquely into a temp buffer, then blend that
|
||||
// with the target opacity...
|
||||
const Rectangle<int> clipBounds (context.g.getClipBounds());
|
||||
Image tempImage (Image::ARGB, clipBounds.getWidth(), clipBounds.getHeight(), true);
|
||||
|
||||
if (! clipBounds.isEmpty())
|
||||
{
|
||||
Graphics tempG (tempImage);
|
||||
tempG.setOrigin (-clipBounds.getX(), -clipBounds.getY());
|
||||
Drawable::RenderingContext tempContext (tempG, context.transform, 1.0f);
|
||||
render (tempContext);
|
||||
}
|
||||
Image tempImage (Image::ARGB, clipBounds.getWidth(), clipBounds.getHeight(), true);
|
||||
|
||||
context.g.setOpacity (context.opacity);
|
||||
context.g.drawImageAt (tempImage, clipBounds.getX(), clipBounds.getY());
|
||||
{
|
||||
Graphics tempG (tempImage);
|
||||
tempG.setOrigin (-clipBounds.getX(), -clipBounds.getY());
|
||||
Drawable::RenderingContext tempContext (tempG, context.transform, 1.0f);
|
||||
render (tempContext);
|
||||
}
|
||||
|
||||
context.g.setOpacity (context.opacity);
|
||||
context.g.drawImageAt (tempImage, clipBounds.getX(), clipBounds.getY());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue