Browse Source

Apply our juce patches

tags/2018-04-16
falkTX 10 years ago
parent
commit
36c2604206
10 changed files with 22 additions and 62 deletions
  1. +0
    -52
      libs/juce/patches/graphicscontext-drawtextaspath.patch
  2. +1
    -0
      libs/juce/source/modules/juce_audio_basics/juce_audio_basics.cpp
  3. +1
    -0
      libs/juce/source/modules/juce_audio_basics/juce_audio_basics.h
  4. +1
    -1
      libs/juce/source/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp
  5. +2
    -1
      libs/juce/source/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
  6. +5
    -0
      libs/juce/source/modules/juce_audio_processors/processors/juce_AudioProcessor.h
  7. +1
    -1
      libs/juce/source/modules/juce_core/native/juce_BasicNativeHeaders.h
  8. +1
    -1
      libs/juce/source/modules/juce_events/messages/juce_Initialisation.h
  9. +6
    -4
      libs/juce/source/modules/juce_gui_basics/windows/juce_DialogWindow.cpp
  10. +4
    -2
      libs/juce/source/modules/juce_gui_basics/windows/juce_DialogWindow.h

+ 0
- 52
libs/juce/patches/graphicscontext-drawtextaspath.patch View File

@@ -1,52 +0,0 @@
diff --git a/modules/juce_graphics/contexts/juce_GraphicsContext.cpp b/modules/juce_graphics/contexts/juce_GraphicsContext.cpp
index 9c3d248..f075073 100644
--- a/modules/juce_graphics/contexts/juce_GraphicsContext.cpp
+++ b/modules/juce_graphics/contexts/juce_GraphicsContext.cpp
@@ -251,6 +251,16 @@ void Graphics::drawSingleLineText (const String& text, const int startX, const i
}
}
+void Graphics::drawTextAsPath (const String& text, const AffineTransform& transform) const
+{
+ if (text.isNotEmpty())
+ {
+ GlyphArrangement arr;
+ arr.addLineOfText (context.getFont(), text, 0.0f, 0.0f);
+ arr.draw (*this, transform);
+ }
+}
+
void Graphics::drawMultiLineText (const String& text, const int startX,
const int baselineY, const int maximumLineWidth) const
{
diff --git a/modules/juce_graphics/contexts/juce_GraphicsContext.h b/modules/juce_graphics/contexts/juce_GraphicsContext.h
index 54e0c5e..2bd58de 100644
--- a/modules/juce_graphics/contexts/juce_GraphicsContext.h
+++ b/modules/juce_graphics/contexts/juce_GraphicsContext.h
@@ -115,7 +115,7 @@ public:
Note there's also a setFont (float, int) method to quickly change the size and
style of the current font.
- @see drawSingleLineText, drawMultiLineText, drawText, drawFittedText
+ @see drawSingleLineText, drawMultiLineText, drawTextAsPath, drawText, drawFittedText
*/
void setFont (const Font& newFont);
@@ -157,6 +157,17 @@ public:
int startX, int baselineY,
int maximumLineWidth) const;
+ /** Renders a string of text as a vector path.
+
+ This allows a string to be transformed with an arbitrary AffineTransform and
+ rendered using the current colour/brush. It's much slower than the normal text methods
+ but more accurate.
+
+ @see setFont
+ */
+ void drawTextAsPath (const String& text,
+ const AffineTransform& transform) const;
+
/** Draws a line of text within a specified rectangle.
The text will be positioned within the rectangle based on the justification

+ 1
- 0
libs/juce/source/modules/juce_audio_basics/juce_audio_basics.cpp View File

@@ -70,6 +70,7 @@ namespace juce
#include "buffers/juce_AudioSampleBuffer.cpp"
#include "buffers/juce_FloatVectorOperations.cpp"
#include "effects/juce_IIRFilter.cpp"
#include "effects/juce_IIRFilterOld.cpp"
#include "effects/juce_LagrangeInterpolator.cpp"
#include "midi/juce_MidiBuffer.cpp"
#include "midi/juce_MidiFile.cpp"


+ 1
- 0
libs/juce/source/modules/juce_audio_basics/juce_audio_basics.h View File

@@ -36,6 +36,7 @@ namespace juce
#include "buffers/juce_FloatVectorOperations.h"
#include "effects/juce_Decibels.h"
#include "effects/juce_IIRFilter.h"
#include "effects/juce_IIRFilterOld.h"
#include "effects/juce_LagrangeInterpolator.h"
#include "effects/juce_Reverb.h"
#include "midi/juce_MidiMessage.h"


+ 1
- 1
libs/juce/source/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp View File

@@ -160,8 +160,8 @@ void AudioDeviceManager::createAudioDeviceTypes (OwnedArray <AudioIODeviceType>&
addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_ASIO());
addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_CoreAudio());
addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_iOSAudio());
addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_ALSA());
addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_JACK());
addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_ALSA());
addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_OpenSLES());
addIfNotNull (list, AudioIODeviceType::createAudioIODeviceType_Android());
}


+ 2
- 1
libs/juce/source/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp View File

@@ -96,6 +96,7 @@
#include "../utility/juce_IncludeModuleHeaders.h"
#include "../utility/juce_FakeMouseMoveGenerator.h"
#include "modules/juce_audio_processors/format_types/juce_VSTMidiEventList.h"
#ifdef _MSC_VER
#pragma pack (pop)
@@ -373,7 +374,7 @@ public:
//==============================================================================
bool getEffectName (char* name) override
{
String (JucePlugin_Name).copyToUTF8 (name, 64);
String (filter->getName()).copyToUTF8 (name, 64);
return true;
}


+ 5
- 0
libs/juce/source/modules/juce_audio_processors/processors/juce_AudioProcessor.h View File

@@ -579,6 +579,11 @@ public:
/** This method is called when the number of input or output channels is changed. */
virtual void numChannelsChanged();
//==============================================================================
/** LV2 specific calls, saving/restore as string. */
virtual String getStateInformationString () { return String::empty; }
virtual void setStateInformationString (const String& data) {}
//==============================================================================
/** Adds a listener that will be called when an aspect of this processor changes. */
virtual void addListener (AudioProcessorListener* newListener);


+ 1
- 1
libs/juce/source/modules/juce_core/native/juce_BasicNativeHeaders.h View File

@@ -87,7 +87,7 @@
#define STRICT 1
#define WIN32_LEAN_AND_MEAN 1
#if JUCE_MINGW
#define _WIN32_WINNT 0x0501
#define _WIN32_WINNT 0x0502
#else
#define _WIN32_WINNT 0x0600
#endif


+ 1
- 1
libs/juce/source/modules/juce_events/messages/juce_Initialisation.h View File

@@ -89,7 +89,7 @@ public:
#else
#if JUCE_WINDOWS
#if defined (WINAPI) || defined (_WINDOWS_)
#if defined (WINAPI) || defined (_WINDOWS_) || defined(JUCE_MINGW)
#define JUCE_MAIN_FUNCTION int __stdcall WinMain (HINSTANCE, HINSTANCE, const LPSTR, int)
#elif defined (_UNICODE)
#define JUCE_MAIN_FUNCTION int __stdcall WinMain (void*, void*, const wchar_t*, int)


+ 6
- 4
libs/juce/source/modules/juce_gui_basics/windows/juce_DialogWindow.cpp View File

@@ -127,7 +127,8 @@ void DialogWindow::showDialog (const String& dialogTitle,
Colour backgroundColour,
const bool escapeKeyTriggersCloseButton,
const bool resizable,
const bool useBottomRightCornerResizer)
const bool useBottomRightCornerResizer,
const bool useNativeTitleBar)
{
LaunchOptions o;
o.dialogTitle = dialogTitle;
@@ -135,9 +136,9 @@ void DialogWindow::showDialog (const String& dialogTitle,
o.componentToCentreAround = componentToCentreAround;
o.dialogBackgroundColour = backgroundColour;
o.escapeKeyTriggersCloseButton = escapeKeyTriggersCloseButton;
o.useNativeTitleBar = false;
o.resizable = resizable;
o.useBottomRightCornerResizer = useBottomRightCornerResizer;
o.useNativeTitleBar = useNativeTitleBar;
o.launchAsync();
}
@@ -149,7 +150,8 @@ int DialogWindow::showModalDialog (const String& dialogTitle,
Colour backgroundColour,
const bool escapeKeyTriggersCloseButton,
const bool resizable,
const bool useBottomRightCornerResizer)
const bool useBottomRightCornerResizer,
const bool useNativeTitleBar)
{
LaunchOptions o;
o.dialogTitle = dialogTitle;
@@ -157,9 +159,9 @@ int DialogWindow::showModalDialog (const String& dialogTitle,
o.componentToCentreAround = componentToCentreAround;
o.dialogBackgroundColour = backgroundColour;
o.escapeKeyTriggersCloseButton = escapeKeyTriggersCloseButton;
o.useNativeTitleBar = false;
o.resizable = resizable;
o.useBottomRightCornerResizer = useBottomRightCornerResizer;
o.useNativeTitleBar = useNativeTitleBar;
return o.runModal();
}


+ 4
- 2
libs/juce/source/modules/juce_gui_basics/windows/juce_DialogWindow.h View File

@@ -193,7 +193,8 @@ public:
Colour backgroundColour,
bool escapeKeyTriggersCloseButton,
bool shouldBeResizable = false,
bool useBottomRightCornerResizer = false);
bool useBottomRightCornerResizer = false,
bool useNativeTitleBar = false);
#if JUCE_MODAL_LOOPS_PERMITTED || DOXYGEN
/** Easy way of quickly showing a dialog box containing a given component.
@@ -241,7 +242,8 @@ public:
Colour backgroundColour,
bool escapeKeyTriggersCloseButton,
bool shouldBeResizable = false,
bool useBottomRightCornerResizer = false);
bool useBottomRightCornerResizer = false,
bool useNativeTitleBar = false);
#endif


Loading…
Cancel
Save