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

Small fixes for the software renderer, mac "help" menu, and directshow flags.

This commit is contained in:
Julian Storer 2011-06-16 16:41:11 +01:00
parent 88e1e031d5
commit 37aaeca294
7 changed files with 78 additions and 16 deletions

View file

@ -633,7 +633,7 @@
#include <dshowasf.h>
#endif
#if JUCE_MEDIAFOUNDATION && JUCE_BUILD_NATIVE
#if JUCE_DIRECTSHOW && JUCE_MEDIAFOUNDATION && JUCE_BUILD_NATIVE
#include <evr.h>
#endif
@ -88166,11 +88166,17 @@ public:
}
else
{
SoftwareRendererClasses::ClipRegionBase::Ptr c (new SoftwareRendererClasses::ClipRegion_EdgeTable (Rectangle<int> (tx, ty, sourceImage.getWidth(), sourceImage.getHeight()).getIntersection (image.getBounds())));
c = clip->applyClipTo (c);
Rectangle<int> area (tx, ty, sourceImage.getWidth(), sourceImage.getHeight());
area = area.getIntersection (image.getBounds());
if (c != nullptr)
c->renderImageUntransformed (destData, srcData, alpha, tx, ty, false);
if (! area.isEmpty())
{
SoftwareRendererClasses::ClipRegionBase::Ptr c (new SoftwareRendererClasses::ClipRegion_EdgeTable (area));
c = clip->applyClipTo (c);
if (c != nullptr)
c->renderImageUntransformed (destData, srcData, alpha, tx, ty, false);
}
}
return;
@ -252879,7 +252885,7 @@ void QuickTimeMovieComponent::setBoundsWithCorrectAspectRatio (const Rectangle<i
/*** Start of inlined file: juce_win32_DirectShowComponent.cpp ***/
#if JUCE_INCLUDED_FILE
#if JUCE_INCLUDED_FILE && JUCE_DIRECTSHOW
namespace DirectShowHelpers
{
@ -283463,10 +283469,16 @@ public:
commandManager->invoke (info, true);
}
currentModel->menuItemSelected (commandId, topLevelIndex);
(new AsyncCommandInvoker (commandId, topLevelIndex))->post();
}
}
void invokeDirectly (const int commandId, const int topLevelIndex)
{
if (currentModel != nullptr)
currentModel->menuItemSelected (commandId, topLevelIndex);
}
void addMenuItem (PopupMenu::MenuItemIterator& iter, NSMenu* menuToAddTo,
const int topLevelMenuId, const int topLevelIndex)
{
@ -283649,6 +283661,25 @@ private:
private:
JUCE_DECLARE_NON_COPYABLE (AsyncMenuUpdater);
};
class AsyncCommandInvoker : public CallbackMessage
{
public:
AsyncCommandInvoker (const int commandId_, const int topLevelIndex_)
: commandId (commandId_), topLevelIndex (topLevelIndex_)
{}
void messageCallback()
{
if (JuceMainMenuHandler::instance != nullptr)
JuceMainMenuHandler::instance->invokeDirectly (commandId, topLevelIndex);
}
private:
const int commandId, topLevelIndex;
JUCE_DECLARE_NON_COPYABLE (AsyncCommandInvoker);
};
};
JuceMainMenuHandler* JuceMainMenuHandler::instance = nullptr;

View file

@ -73,7 +73,7 @@ namespace JuceDummyNamespace {}
*/
#define JUCE_MAJOR_VERSION 1
#define JUCE_MINOR_VERSION 53
#define JUCE_BUILDNUMBER 102
#define JUCE_BUILDNUMBER 103
/** Current Juce version number.

View file

@ -33,7 +33,7 @@
*/
#define JUCE_MAJOR_VERSION 1
#define JUCE_MINOR_VERSION 53
#define JUCE_BUILDNUMBER 102
#define JUCE_BUILDNUMBER 103
/** Current Juce version number.

View file

@ -2144,11 +2144,17 @@ public:
}
else
{
SoftwareRendererClasses::ClipRegionBase::Ptr c (new SoftwareRendererClasses::ClipRegion_EdgeTable (Rectangle<int> (tx, ty, sourceImage.getWidth(), sourceImage.getHeight()).getIntersection (image.getBounds())));
c = clip->applyClipTo (c);
Rectangle<int> area (tx, ty, sourceImage.getWidth(), sourceImage.getHeight());
area = area.getIntersection (image.getBounds());
if (c != nullptr)
c->renderImageUntransformed (destData, srcData, alpha, tx, ty, false);
if (! area.isEmpty())
{
SoftwareRendererClasses::ClipRegionBase::Ptr c (new SoftwareRendererClasses::ClipRegion_EdgeTable (area));
c = clip->applyClipTo (c);
if (c != nullptr)
c->renderImageUntransformed (destData, srcData, alpha, tx, ty, false);
}
}
return;

View file

@ -184,10 +184,16 @@ public:
commandManager->invoke (info, true);
}
currentModel->menuItemSelected (commandId, topLevelIndex);
(new AsyncCommandInvoker (commandId, topLevelIndex))->post();
}
}
void invokeDirectly (const int commandId, const int topLevelIndex)
{
if (currentModel != nullptr)
currentModel->menuItemSelected (commandId, topLevelIndex);
}
void addMenuItem (PopupMenu::MenuItemIterator& iter, NSMenu* menuToAddTo,
const int topLevelMenuId, const int topLevelIndex)
{
@ -370,6 +376,25 @@ private:
private:
JUCE_DECLARE_NON_COPYABLE (AsyncMenuUpdater);
};
class AsyncCommandInvoker : public CallbackMessage
{
public:
AsyncCommandInvoker (const int commandId_, const int topLevelIndex_)
: commandId (commandId_), topLevelIndex (topLevelIndex_)
{}
void messageCallback()
{
if (JuceMainMenuHandler::instance != nullptr)
JuceMainMenuHandler::instance->invokeDirectly (commandId, topLevelIndex);
}
private:
const int commandId, topLevelIndex;
JUCE_DECLARE_NON_COPYABLE (AsyncCommandInvoker);
};
};
JuceMainMenuHandler* JuceMainMenuHandler::instance = nullptr;

View file

@ -23,7 +23,7 @@
==============================================================================
*/
#if JUCE_INCLUDED_FILE
#if JUCE_INCLUDED_FILE && JUCE_DIRECTSHOW
//======================================================================

View file

@ -150,7 +150,7 @@
#include <dshowasf.h>
#endif
#if JUCE_MEDIAFOUNDATION && JUCE_BUILD_NATIVE
#if JUCE_DIRECTSHOW && JUCE_MEDIAFOUNDATION && JUCE_BUILD_NATIVE
#include <evr.h>
#endif