diff --git a/extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj b/extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj index c034f1dc8e..1d445ec279 100644 --- a/extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj +++ b/extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj @@ -173,6 +173,7 @@ 271A1D94B96A8B7C949FD8ED = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ComponentMovementWatcher.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_ComponentMovementWatcher.cpp"; sourceTree = "SOURCE_ROOT"; }; 2A060BB0D79BEC3CF644F553 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_Clipboard.cpp"; path = "../../../../modules/juce_gui_basics/native/juce_linux_Clipboard.cpp"; sourceTree = "SOURCE_ROOT"; }; 2A4B079CDB9C40EB912B6EEB = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileInputSource.h"; path = "../../../../modules/juce_core/streams/juce_FileInputSource.h"; sourceTree = "SOURCE_ROOT"; }; + 2AADCE9D8BADF4DAC05CCA1E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RenderingHelpers.h"; path = "../../../../modules/juce_graphics/native/juce_RenderingHelpers.h"; sourceTree = "SOURCE_ROOT"; }; 2B074BFC193A25602E73D0CC = { isa = PBXFileReference; lastKnownFileType = file; name = "juce_module_info"; path = "../../../../modules/juce_core/juce_module_info"; sourceTree = "SOURCE_ROOT"; }; 2B8548461E318DCB3354DB43 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_gui_basics.h"; path = "../../../../modules/juce_gui_basics/juce_gui_basics.h"; sourceTree = "SOURCE_ROOT"; }; 2BB98D1E325EF7BD90C6BBB4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_NamedPipe.h"; path = "../../../../modules/juce_core/network/juce_NamedPipe.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1202,6 +1203,7 @@ 1F36217CE7A5B1D63D41EA6C, 045B9C5D21C5C86FED140D81, 0B96A219A0CFF707E5A13B68, + 2AADCE9D8BADF4DAC05CCA1E, 21FAFA7F2C5D0E8D99876EA8, 5843A5060852C6ACC4770EC7 ); name = native; sourceTree = ""; }; E9819C83D0B797FC71811B1B = { isa = PBXGroup; children = ( diff --git a/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj b/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj index 7f37b9e2a5..57e75a4627 100644 --- a/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj +++ b/extras/Introjucer/Builds/VisualStudio2005/The Introjucer.vcproj @@ -1874,6 +1874,7 @@ + diff --git a/extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj b/extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj index 23bb7c735e..b97107b193 100644 --- a/extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj +++ b/extras/Introjucer/Builds/VisualStudio2008/The Introjucer.vcproj @@ -1874,6 +1874,7 @@ + diff --git a/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj b/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj index e88faf2cca..96c43495d7 100644 --- a/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj +++ b/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj @@ -1166,6 +1166,7 @@ + diff --git a/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj.filters b/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj.filters index 6239e304c8..20a5305d1d 100644 --- a/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj.filters +++ b/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.vcxproj.filters @@ -1851,6 +1851,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics diff --git a/extras/JuceDemo/Builds/MacOSX/Juce Demo.xcodeproj/project.pbxproj b/extras/JuceDemo/Builds/MacOSX/Juce Demo.xcodeproj/project.pbxproj index 699e6a5f43..f9c32d1bd4 100644 --- a/extras/JuceDemo/Builds/MacOSX/Juce Demo.xcodeproj/project.pbxproj +++ b/extras/JuceDemo/Builds/MacOSX/Juce Demo.xcodeproj/project.pbxproj @@ -185,6 +185,7 @@ 2590DCE65DE2323D9EF77214 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OwnedArray.h"; path = "../../../../modules/juce_core/containers/juce_OwnedArray.h"; sourceTree = "SOURCE_ROOT"; }; 2597ED98D3C16A7EEF1FBFFD = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_osx_ObjCHelpers.h"; path = "../../../../modules/juce_core/native/juce_osx_ObjCHelpers.h"; sourceTree = "SOURCE_ROOT"; }; 25FECE7ACACB29E1725A6A17 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioFormatReader.cpp"; path = "../../../../modules/juce_audio_formats/format/juce_AudioFormatReader.cpp"; sourceTree = "SOURCE_ROOT"; }; + 2649F70294DB168919CBCAD3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RenderingHelpers.h"; path = "../../../../modules/juce_graphics/native/juce_RenderingHelpers.h"; sourceTree = "SOURCE_ROOT"; }; 2666A5013948E2EAD29458C1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Expression.cpp"; path = "../../../../modules/juce_core/maths/juce_Expression.cpp"; sourceTree = "SOURCE_ROOT"; }; 26B73C77D47B146F92BEA265 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DrawableText.h"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawableText.h"; sourceTree = "SOURCE_ROOT"; }; 2708E4F2F73D88F73D8E54D0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DrawablePath.cpp"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawablePath.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -1511,6 +1512,7 @@ 8EB9B4853F225BDB97D6626E, 8154D2D681E028B8783E5331, 0BBEDD3E8C0C2B7C4B52016A, + 2649F70294DB168919CBCAD3, 5712EB90A8B51DBBC4E19A39, 5CABE190EBD0F4EEB763114A ); name = native; sourceTree = ""; }; 980520A52BB3BF76E45AECA8 = { isa = PBXGroup; children = ( diff --git a/extras/JuceDemo/Builds/VisualStudio2005/Juce Demo.vcproj b/extras/JuceDemo/Builds/VisualStudio2005/Juce Demo.vcproj index 1e614143b4..9ebe58ca6d 100644 --- a/extras/JuceDemo/Builds/VisualStudio2005/Juce Demo.vcproj +++ b/extras/JuceDemo/Builds/VisualStudio2005/Juce Demo.vcproj @@ -2608,6 +2608,7 @@ + diff --git a/extras/JuceDemo/Builds/VisualStudio2008/Juce Demo.vcproj b/extras/JuceDemo/Builds/VisualStudio2008/Juce Demo.vcproj index 50342d31b4..7c982899bd 100644 --- a/extras/JuceDemo/Builds/VisualStudio2008/Juce Demo.vcproj +++ b/extras/JuceDemo/Builds/VisualStudio2008/Juce Demo.vcproj @@ -2608,6 +2608,7 @@ + diff --git a/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj b/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj index bfe1e27058..e0d88e7227 100644 --- a/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj +++ b/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj @@ -1431,6 +1431,7 @@ + diff --git a/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj.filters b/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj.filters index 0a6ac9f75a..ff3a96bcaa 100644 --- a/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj.filters +++ b/extras/JuceDemo/Builds/VisualStudio2010/Juce Demo.vcxproj.filters @@ -2334,6 +2334,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics diff --git a/extras/JuceDemo/Builds/iOS/Juce Demo.xcodeproj/project.pbxproj b/extras/JuceDemo/Builds/iOS/Juce Demo.xcodeproj/project.pbxproj index 3daf4bf1c6..7c84ef9557 100644 --- a/extras/JuceDemo/Builds/iOS/Juce Demo.xcodeproj/project.pbxproj +++ b/extras/JuceDemo/Builds/iOS/Juce Demo.xcodeproj/project.pbxproj @@ -178,6 +178,7 @@ 2590DCE65DE2323D9EF77214 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_OwnedArray.h"; path = "../../../../modules/juce_core/containers/juce_OwnedArray.h"; sourceTree = "SOURCE_ROOT"; }; 2597ED98D3C16A7EEF1FBFFD = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_osx_ObjCHelpers.h"; path = "../../../../modules/juce_core/native/juce_osx_ObjCHelpers.h"; sourceTree = "SOURCE_ROOT"; }; 25FECE7ACACB29E1725A6A17 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioFormatReader.cpp"; path = "../../../../modules/juce_audio_formats/format/juce_AudioFormatReader.cpp"; sourceTree = "SOURCE_ROOT"; }; + 2649F70294DB168919CBCAD3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RenderingHelpers.h"; path = "../../../../modules/juce_graphics/native/juce_RenderingHelpers.h"; sourceTree = "SOURCE_ROOT"; }; 2666A5013948E2EAD29458C1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Expression.cpp"; path = "../../../../modules/juce_core/maths/juce_Expression.cpp"; sourceTree = "SOURCE_ROOT"; }; 26B73C77D47B146F92BEA265 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DrawableText.h"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawableText.h"; sourceTree = "SOURCE_ROOT"; }; 2708E4F2F73D88F73D8E54D0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DrawablePath.cpp"; path = "../../../../modules/juce_gui_basics/drawables/juce_DrawablePath.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -1501,6 +1502,7 @@ 8EB9B4853F225BDB97D6626E, 8154D2D681E028B8783E5331, 0BBEDD3E8C0C2B7C4B52016A, + 2649F70294DB168919CBCAD3, 5712EB90A8B51DBBC4E19A39, 5CABE190EBD0F4EEB763114A ); name = native; sourceTree = ""; }; 980520A52BB3BF76E45AECA8 = { isa = PBXGroup; children = ( diff --git a/extras/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj b/extras/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj index 8e49024c9c..f10f573ab7 100644 --- a/extras/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj +++ b/extras/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj @@ -123,6 +123,7 @@ 103FA4C6C505052C818A4829 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AUTimestampGenerator.h; path = Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUTimestampGenerator.h; sourceTree = "DEVELOPER_DIR"; }; 104CC5F094E0B3D1D3055D04 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_AudioUnitPluginFormat.h"; path = "../../../../modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h"; sourceTree = "SOURCE_ROOT"; }; 10A49DD74F3FB9E69FC989B9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_JPEGLoader.cpp"; path = "../../../../modules/juce_graphics/image_formats/juce_JPEGLoader.cpp"; sourceTree = "SOURCE_ROOT"; }; + 1127215528CC4A4A504078BF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RenderingHelpers.h"; path = "../../../../modules/juce_graphics/native/juce_RenderingHelpers.h"; sourceTree = "SOURCE_ROOT"; }; 115FCA1C09C15AD7EB4AC87C = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_BufferedInputStream.cpp"; path = "../../../../modules/juce_core/streams/juce_BufferedInputStream.cpp"; sourceTree = "SOURCE_ROOT"; }; 121FB46FF3426D00B9776611 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ChoicePropertyComponent.h"; path = "../../../../modules/juce_gui_basics/properties/juce_ChoicePropertyComponent.h"; sourceTree = "SOURCE_ROOT"; }; 1225618F94215E066D1D982D = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_QuickTimeAudioFormat.h"; path = "../../../../modules/juce_audio_formats/codecs/juce_QuickTimeAudioFormat.h"; sourceTree = "SOURCE_ROOT"; }; @@ -1427,6 +1428,7 @@ 3F05190135896541D991C075, 802E244849C0AE5DACD3FCCB, 56A295F04B7F248D0A52B878, + 1127215528CC4A4A504078BF, C8302DD07934EBD796C2BFBB, 78959840E3EF9DC06998BB42 ); name = native; sourceTree = ""; }; F0F89564A3784EB052CEE01B = { isa = PBXGroup; children = ( diff --git a/extras/audio plugin demo/Builds/VisualStudio2005/JuceDemoPlugin.vcproj b/extras/audio plugin demo/Builds/VisualStudio2005/JuceDemoPlugin.vcproj index ee9eab199b..e3bca220d9 100644 --- a/extras/audio plugin demo/Builds/VisualStudio2005/JuceDemoPlugin.vcproj +++ b/extras/audio plugin demo/Builds/VisualStudio2005/JuceDemoPlugin.vcproj @@ -2545,6 +2545,7 @@ + diff --git a/extras/audio plugin demo/Builds/VisualStudio2008/JuceDemoPlugin.vcproj b/extras/audio plugin demo/Builds/VisualStudio2008/JuceDemoPlugin.vcproj index d29c65e09c..2256f79b44 100644 --- a/extras/audio plugin demo/Builds/VisualStudio2008/JuceDemoPlugin.vcproj +++ b/extras/audio plugin demo/Builds/VisualStudio2008/JuceDemoPlugin.vcproj @@ -2545,6 +2545,7 @@ + diff --git a/extras/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj b/extras/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj index 90e81977e4..7a0e39bda5 100644 --- a/extras/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj +++ b/extras/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj @@ -521,6 +521,7 @@ 94A770B7E16685F3469CA932 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_NativeMessageBox.h"; path = "../../../../modules/juce_gui_basics/windows/juce_NativeMessageBox.h"; sourceTree = "SOURCE_ROOT"; }; 94B22D21E4DE9259A3F385A3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DropShadowEffect.h"; path = "../../../../modules/juce_graphics/effects/juce_DropShadowEffect.h"; sourceTree = "SOURCE_ROOT"; }; 94B986F221A8369B8DE3D986 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_WeakReference.h"; path = "../../../../modules/juce_core/memory/juce_WeakReference.h"; sourceTree = "SOURCE_ROOT"; }; + 94D27CA81B1481621186F4D5 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RenderingHelpers.h"; path = "../../../../modules/juce_graphics/native/juce_RenderingHelpers.h"; sourceTree = "SOURCE_ROOT"; }; 956BE0B32D5B1410E43A3C58 = { isa = PBXFileReference; lastKnownFileType = file; name = "juce_module_info"; path = "../../../../modules/juce_data_structures/juce_module_info"; sourceTree = "SOURCE_ROOT"; }; 957428BC0CD90C37ED1EB7E1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_StringArray.h"; path = "../../../../modules/juce_core/text/juce_StringArray.h"; sourceTree = "SOURCE_ROOT"; }; 9647232A743A0C7BFE819385 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TextPropertyComponent.h"; path = "../../../../modules/juce_gui_basics/properties/juce_TextPropertyComponent.h"; sourceTree = "SOURCE_ROOT"; }; @@ -734,7 +735,6 @@ DD53156BA824889FD7DF52D2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ThreadPool.cpp"; path = "../../../../modules/juce_core/threads/juce_ThreadPool.cpp"; sourceTree = "SOURCE_ROOT"; }; DD8E5D0C88FA2C287F824357 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = GraphEditorPanel.h; path = ../../Source/GraphEditorPanel.h; sourceTree = "SOURCE_ROOT"; }; DE0C4CC1CE545BAD009786E4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioFormatWriter.cpp"; path = "../../../../modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp"; sourceTree = "SOURCE_ROOT"; }; - DE8035865F6033F8BBF41740 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_HyperlinkButton.cpp"; path = "../../../../modules/juce_gui_basics/buttons/juce_HyperlinkButton.cpp"; sourceTree = "SOURCE_ROOT"; }; E146C1CCDC8EA0498CD33E5D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioIODevice.cpp"; path = "../../../../modules/juce_audio_devices/audio_io/juce_AudioIODevice.cpp"; sourceTree = "SOURCE_ROOT"; }; E179C9C99270068D4ED16872 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ReverbAudioSource.h"; path = "../../../../modules/juce_audio_basics/sources/juce_ReverbAudioSource.h"; sourceTree = "SOURCE_ROOT"; }; E68018DE199135B7F738FB17 = { isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudioKit.framework; path = System/Library/Frameworks/CoreAudioKit.framework; sourceTree = SDKROOT; }; @@ -756,6 +756,7 @@ DE0712F13AD6AB6180E2E680 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_FileSearchPathListComponent.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileSearchPathListComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; DE1FE14BE1B14A214C2D8B66 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_WildcardFileFilter.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_WildcardFileFilter.cpp"; sourceTree = "SOURCE_ROOT"; }; DE435BB18276B8626AF37D05 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ScopedValueSetter.h"; path = "../../../../modules/juce_core/containers/juce_ScopedValueSetter.h"; sourceTree = "SOURCE_ROOT"; }; + DE8035865F6033F8BBF41740 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_HyperlinkButton.cpp"; path = "../../../../modules/juce_gui_basics/buttons/juce_HyperlinkButton.cpp"; sourceTree = "SOURCE_ROOT"; }; DEEFCE87BE3B9D7AFC7ADC16 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ApplicationCommandInfo.cpp"; path = "../../../../modules/juce_gui_basics/commands/juce_ApplicationCommandInfo.cpp"; sourceTree = "SOURCE_ROOT"; }; DF309886A3D26FC34280B329 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_CameraDevice.mm"; path = "../../../../modules/juce_video/native/juce_mac_CameraDevice.mm"; sourceTree = "SOURCE_ROOT"; }; DF614EDBEA2D76889E002465 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_linux_SystemTrayIcon.cpp"; path = "../../../../modules/juce_gui_extra/native/juce_linux_SystemTrayIcon.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -1433,6 +1434,7 @@ 3D64A2C5EB65C68C4CBE47C3, 2355148BC8F47D63CB66C40F, AA7350771ED17561EB915EED, + 94D27CA81B1481621186F4D5, C62FBDF34D1B74CCF12AEA2F, 64A1DACEA71957604AD58B3C ); name = native; sourceTree = ""; }; 735136A0AB9278D0871D9684 = { isa = PBXGroup; children = ( diff --git a/extras/audio plugin host/Builds/VisualStudio2005/Plugin Host.vcproj b/extras/audio plugin host/Builds/VisualStudio2005/Plugin Host.vcproj index 4872860b44..9eca1ce9af 100644 --- a/extras/audio plugin host/Builds/VisualStudio2005/Plugin Host.vcproj +++ b/extras/audio plugin host/Builds/VisualStudio2005/Plugin Host.vcproj @@ -2531,6 +2531,7 @@ + diff --git a/extras/audio plugin host/Builds/VisualStudio2008/Plugin Host.vcproj b/extras/audio plugin host/Builds/VisualStudio2008/Plugin Host.vcproj index 2ade11601e..e1368cfb59 100644 --- a/extras/audio plugin host/Builds/VisualStudio2008/Plugin Host.vcproj +++ b/extras/audio plugin host/Builds/VisualStudio2008/Plugin Host.vcproj @@ -2531,6 +2531,7 @@ + diff --git a/extras/example projects/Builds/MacOSX/HelloWorld.xcodeproj/project.pbxproj b/extras/example projects/Builds/MacOSX/HelloWorld.xcodeproj/project.pbxproj index d98ddbbb98..d627de60c7 100644 --- a/extras/example projects/Builds/MacOSX/HelloWorld.xcodeproj/project.pbxproj +++ b/extras/example projects/Builds/MacOSX/HelloWorld.xcodeproj/project.pbxproj @@ -204,6 +204,7 @@ 4A5ED88CC2ED6ADD8A5B102A = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Result.h"; path = "../../../../modules/juce_core/misc/juce_Result.h"; sourceTree = "SOURCE_ROOT"; }; 4A8C64BB96FB93919DDF2166 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_ios_MessageManager.mm"; path = "../../../../modules/juce_events/native/juce_ios_MessageManager.mm"; sourceTree = "SOURCE_ROOT"; }; 4BCEEF3FC9849208FF6B1BD7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RectangleList.cpp"; path = "../../../../modules/juce_graphics/geometry/juce_RectangleList.cpp"; sourceTree = "SOURCE_ROOT"; }; + 4C34CB4DC542D86A193C055A = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RenderingHelpers.h"; path = "../../../../modules/juce_graphics/native/juce_RenderingHelpers.h"; sourceTree = "SOURCE_ROOT"; }; 4CC331BEE18B3EC4BADF38CE = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Colours.h"; path = "../../../../modules/juce_graphics/colour/juce_Colours.h"; sourceTree = "SOURCE_ROOT"; }; 4D44E9AD19469774ED8245B2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_CodeEditorComponent.cpp"; path = "../../../../modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; 4D6C90354134741F7F295412 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DirectoryContentsDisplayComponent.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_DirectoryContentsDisplayComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -987,6 +988,7 @@ 65A88D5E8C1F0BE74F05C072, 06EF239CDE579FFC28F65BE2, C6BCFCD2732C7153C33B6168, + 4C34CB4DC542D86A193C055A, A3961F3261459774B65EBD3B, A5E748EC8CB636CEBF7BA497 ); name = native; sourceTree = ""; }; 0BD57F3380CCDFE06E36335D = { isa = PBXGroup; children = ( diff --git a/extras/example projects/Builds/VisualStudio2005/HelloWorld.vcproj b/extras/example projects/Builds/VisualStudio2005/HelloWorld.vcproj index 8a86525c11..62d8786ed4 100644 --- a/extras/example projects/Builds/VisualStudio2005/HelloWorld.vcproj +++ b/extras/example projects/Builds/VisualStudio2005/HelloWorld.vcproj @@ -1602,6 +1602,7 @@ + diff --git a/extras/example projects/Builds/VisualStudio2008/HelloWorld.vcproj b/extras/example projects/Builds/VisualStudio2008/HelloWorld.vcproj index cfa9c1dcd1..12856b972c 100644 --- a/extras/example projects/Builds/VisualStudio2008/HelloWorld.vcproj +++ b/extras/example projects/Builds/VisualStudio2008/HelloWorld.vcproj @@ -1602,6 +1602,7 @@ + diff --git a/extras/example projects/Builds/iOS/HelloWorld.xcodeproj/project.pbxproj b/extras/example projects/Builds/iOS/HelloWorld.xcodeproj/project.pbxproj index 1b5d476aec..4aef5ff6f7 100644 --- a/extras/example projects/Builds/iOS/HelloWorld.xcodeproj/project.pbxproj +++ b/extras/example projects/Builds/iOS/HelloWorld.xcodeproj/project.pbxproj @@ -202,6 +202,7 @@ 4A5ED88CC2ED6ADD8A5B102A = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Result.h"; path = "../../../../modules/juce_core/misc/juce_Result.h"; sourceTree = "SOURCE_ROOT"; }; 4A8C64BB96FB93919DDF2166 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_ios_MessageManager.mm"; path = "../../../../modules/juce_events/native/juce_ios_MessageManager.mm"; sourceTree = "SOURCE_ROOT"; }; 4BCEEF3FC9849208FF6B1BD7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RectangleList.cpp"; path = "../../../../modules/juce_graphics/geometry/juce_RectangleList.cpp"; sourceTree = "SOURCE_ROOT"; }; + 4C34CB4DC542D86A193C055A = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RenderingHelpers.h"; path = "../../../../modules/juce_graphics/native/juce_RenderingHelpers.h"; sourceTree = "SOURCE_ROOT"; }; 4CC331BEE18B3EC4BADF38CE = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Colours.h"; path = "../../../../modules/juce_graphics/colour/juce_Colours.h"; sourceTree = "SOURCE_ROOT"; }; 4D44E9AD19469774ED8245B2 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_CodeEditorComponent.cpp"; path = "../../../../modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; 4D6C90354134741F7F295412 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DirectoryContentsDisplayComponent.cpp"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_DirectoryContentsDisplayComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -985,6 +986,7 @@ 65A88D5E8C1F0BE74F05C072, 06EF239CDE579FFC28F65BE2, C6BCFCD2732C7153C33B6168, + 4C34CB4DC542D86A193C055A, A3961F3261459774B65EBD3B, A5E748EC8CB636CEBF7BA497 ); name = native; sourceTree = ""; }; 0BD57F3380CCDFE06E36335D = { isa = PBXGroup; children = ( diff --git a/extras/static library/Builds/MacOSX/juce.xcodeproj/project.pbxproj b/extras/static library/Builds/MacOSX/juce.xcodeproj/project.pbxproj index 05d502dc4b..fe79b14fd5 100644 --- a/extras/static library/Builds/MacOSX/juce.xcodeproj/project.pbxproj +++ b/extras/static library/Builds/MacOSX/juce.xcodeproj/project.pbxproj @@ -283,6 +283,7 @@ 5880762117A1A76DD727CA63 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MultiDocumentPanel.h"; path = "../../../../modules/juce_gui_basics/layout/juce_MultiDocumentPanel.h"; sourceTree = "SOURCE_ROOT"; }; 5902132028ACFC53C962F230 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RelativePointPath.cpp"; path = "../../../../modules/juce_gui_basics/positioning/juce_RelativePointPath.cpp"; sourceTree = "SOURCE_ROOT"; }; 592A4CD8EED76FAA0FBEA184 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FilenameComponent.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FilenameComponent.h"; sourceTree = "SOURCE_ROOT"; }; + 593F1523B6A7AB5415E2CD53 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RenderingHelpers.h"; path = "../../../../modules/juce_graphics/native/juce_RenderingHelpers.h"; sourceTree = "SOURCE_ROOT"; }; 594ABD541467FC1AFBCD55FA = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FileBrowserListener.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FileBrowserListener.h"; sourceTree = "SOURCE_ROOT"; }; 59832DC05A7ABD631038D969 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FilePreviewComponent.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FilePreviewComponent.h"; sourceTree = "SOURCE_ROOT"; }; 59A49FA3DB4C77011B973631 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ResizableCornerComponent.cpp"; path = "../../../../modules/juce_gui_basics/layout/juce_ResizableCornerComponent.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -1352,6 +1353,7 @@ 56EBED6737E33DF652255BE9, D380ABD8012C0F956AFAAD10, FA89AC987131D027ACE40582, + 593F1523B6A7AB5415E2CD53, 124BDF35CA497A669F44F8A0, AF1FAE38CC1CE6EA02FFD06E ); name = native; sourceTree = ""; }; CEDD2E509C8955328B9E4338 = { isa = PBXGroup; children = ( diff --git a/extras/static library/Builds/VisualStudio2008/juce.vcproj b/extras/static library/Builds/VisualStudio2008/juce.vcproj index d5ade7664f..6618ab9bfa 100644 --- a/extras/static library/Builds/VisualStudio2008/juce.vcproj +++ b/extras/static library/Builds/VisualStudio2008/juce.vcproj @@ -2422,6 +2422,7 @@ + diff --git a/extras/static library/Builds/VisualStudio2010/juce.vcxproj b/extras/static library/Builds/VisualStudio2010/juce.vcxproj index 2ad25436a5..9157b2e939 100644 --- a/extras/static library/Builds/VisualStudio2010/juce.vcxproj +++ b/extras/static library/Builds/VisualStudio2010/juce.vcxproj @@ -1377,6 +1377,7 @@ + diff --git a/extras/static library/Builds/VisualStudio2010/juce.vcxproj.filters b/extras/static library/Builds/VisualStudio2010/juce.vcxproj.filters index df674c260c..b7382117a7 100644 --- a/extras/static library/Builds/VisualStudio2010/juce.vcxproj.filters +++ b/extras/static library/Builds/VisualStudio2010/juce.vcxproj.filters @@ -2169,6 +2169,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics diff --git a/extras/the jucer/Builds/MacOSX/Jucer.xcodeproj/project.pbxproj b/extras/the jucer/Builds/MacOSX/Jucer.xcodeproj/project.pbxproj index 9f56a77aed..637846abdc 100644 --- a/extras/the jucer/Builds/MacOSX/Jucer.xcodeproj/project.pbxproj +++ b/extras/the jucer/Builds/MacOSX/Jucer.xcodeproj/project.pbxproj @@ -304,6 +304,7 @@ 568F49023595072F6E4915D7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ComponentAnimator.h"; path = "../../../../modules/juce_gui_basics/layout/juce_ComponentAnimator.h"; sourceTree = "SOURCE_ROOT"; }; 56AF594373CD84AB81D63595 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_gui_basics.h"; path = "../../../../modules/juce_gui_basics/juce_gui_basics.h"; sourceTree = "SOURCE_ROOT"; }; 56B86E116B1A1204837D4F02 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_DynamicObject.cpp"; path = "../../../../modules/juce_core/containers/juce_DynamicObject.cpp"; sourceTree = "SOURCE_ROOT"; }; + 570D06B805FFCB2D29247478 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_RenderingHelpers.h"; path = "../../../../modules/juce_graphics/native/juce_RenderingHelpers.h"; sourceTree = "SOURCE_ROOT"; }; 571668630341CED2E68ED143 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_mac_Files.mm"; path = "../../../../modules/juce_core/native/juce_mac_Files.mm"; sourceTree = "SOURCE_ROOT"; }; 5727AEA6C0EC63CDBC35623D = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_PropertySet.h"; path = "../../../../modules/juce_core/containers/juce_PropertySet.h"; sourceTree = "SOURCE_ROOT"; }; 5730B4F295752F68F543A5F1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_Drawable.cpp"; path = "../../../../modules/juce_gui_basics/drawables/juce_Drawable.cpp"; sourceTree = "SOURCE_ROOT"; }; @@ -1247,6 +1248,7 @@ FCB2AD7C12426703410DA46C, 0875B5E550065BE3ACF5833E, 4E07995C0E9951843B936AF1, + 570D06B805FFCB2D29247478, A27536EAA6565A95670917FE, A639ECE96CA7798C1E61F5FA ); name = native; sourceTree = ""; }; 8E157165495A4C0D5FE429BE = { isa = PBXGroup; children = ( diff --git a/extras/the jucer/Builds/VisualStudio2008/Jucer.vcproj b/extras/the jucer/Builds/VisualStudio2008/Jucer.vcproj index 4cc194bb09..6c7a288f44 100644 --- a/extras/the jucer/Builds/VisualStudio2008/Jucer.vcproj +++ b/extras/the jucer/Builds/VisualStudio2008/Jucer.vcproj @@ -1769,6 +1769,7 @@ + diff --git a/extras/the jucer/Builds/VisualStudio2010/Jucer.vcxproj b/extras/the jucer/Builds/VisualStudio2010/Jucer.vcxproj index ef3bf1f79c..4224622c51 100644 --- a/extras/the jucer/Builds/VisualStudio2010/Jucer.vcxproj +++ b/extras/the jucer/Builds/VisualStudio2010/Jucer.vcxproj @@ -1163,6 +1163,7 @@ + diff --git a/extras/the jucer/Builds/VisualStudio2010/Jucer.vcxproj.filters b/extras/the jucer/Builds/VisualStudio2010/Jucer.vcxproj.filters index 0148e6d49e..0b48d5361b 100644 --- a/extras/the jucer/Builds/VisualStudio2010/Jucer.vcxproj.filters +++ b/extras/the jucer/Builds/VisualStudio2010/Jucer.vcxproj.filters @@ -1908,6 +1908,9 @@ Juce Modules\juce_graphics\native + + Juce Modules\juce_graphics\native + Juce Modules\juce_graphics diff --git a/modules/juce_core/maths/juce_MathsFunctions.h b/modules/juce_core/maths/juce_MathsFunctions.h index 17d4f8ce7f..816c4b3fc3 100644 --- a/modules/juce_core/maths/juce_MathsFunctions.h +++ b/modules/juce_core/maths/juce_MathsFunctions.h @@ -424,6 +424,17 @@ bool isPowerOfTwo (IntegerType value) return (value & (value - 1)) == 0; } +/** Performs a modulo operation, but can cope with the dividend being negative. + The divisor must be greater than zero. +*/ +template +int negativeAwareModulo (IntegerType dividend, const IntegerType divisor) noexcept +{ + jassert (divisor > 0); + dividend %= divisor; + return (dividend < 0) ? (dividend + divisor) : dividend; +} + //============================================================================== #if (JUCE_INTEL && JUCE_32BIT) || defined (DOXYGEN) /** This macro can be applied to a float variable to check whether it contains a denormalised diff --git a/modules/juce_graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp b/modules/juce_graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp index abf61e5435..b15fac4acd 100644 --- a/modules/juce_graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp +++ b/modules/juce_graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp @@ -394,17 +394,6 @@ private: JUCE_DECLARE_NON_COPYABLE (GradientEdgeTableRenderer); }; -//============================================================================== -namespace RenderingHelpers -{ - forcedinline int safeModulo (int n, const int divisor) noexcept - { - jassert (divisor > 0); - n %= divisor; - return (n < 0) ? (n + divisor) : n; - } -} - //============================================================================== template class ImageFillEdgeTableRenderer @@ -417,8 +406,8 @@ public: : destData (destData_), srcData (srcData_), extraAlpha (extraAlpha_ + 1), - xOffset (repeatPattern ? RenderingHelpers::safeModulo (x, srcData_.width) - srcData_.width : x), - yOffset (repeatPattern ? RenderingHelpers::safeModulo (y, srcData_.height) - srcData_.height : y) + xOffset (repeatPattern ? negativeAwareModulo (x, srcData_.width) - srcData_.width : x), + yOffset (repeatPattern ? negativeAwareModulo (y, srcData_.height) - srcData_.height : y) { } @@ -660,8 +649,8 @@ private: if (repeatPattern) { - loResX = RenderingHelpers::safeModulo (loResX, srcData.width); - loResY = RenderingHelpers::safeModulo (loResY, srcData.height); + loResX = negativeAwareModulo (loResX, srcData.width); + loResY = negativeAwareModulo (loResY, srcData.height); } if (betterQuality) @@ -1762,69 +1751,36 @@ class LowLevelGraphicsSoftwareRenderer::SavedState public: SavedState (const Image& image_, const Rectangle& clip_, const int xOffset_, const int yOffset_) : image (image_), clip (new SoftwareRendererClasses::ClipRegion_RectangleList (clip_)), - xOffset (xOffset_), yOffset (yOffset_), compositionAlpha (1.0f), - isOnlyTranslated (true), interpolationQuality (Graphics::mediumResamplingQuality) + transform (xOffset_, yOffset_), + interpolationQuality (Graphics::mediumResamplingQuality), + transparencyLayerAlpha (1.0f) { } SavedState (const Image& image_, const RectangleList& clip_, const int xOffset_, const int yOffset_) : image (image_), clip (new SoftwareRendererClasses::ClipRegion_RectangleList (clip_)), - xOffset (xOffset_), yOffset (yOffset_), compositionAlpha (1.0f), - isOnlyTranslated (true), interpolationQuality (Graphics::mediumResamplingQuality) + transform (xOffset_, yOffset_), + interpolationQuality (Graphics::mediumResamplingQuality), + transparencyLayerAlpha (1.0f) { } SavedState (const SavedState& other) - : image (other.image), clip (other.clip), complexTransform (other.complexTransform), - xOffset (other.xOffset), yOffset (other.yOffset), compositionAlpha (other.compositionAlpha), - isOnlyTranslated (other.isOnlyTranslated), font (other.font), fillType (other.fillType), - interpolationQuality (other.interpolationQuality) + : image (other.image), clip (other.clip), transform (other.transform), + font (other.font), fillType (other.fillType), + interpolationQuality (other.interpolationQuality), + transparencyLayerAlpha (other.transparencyLayerAlpha) { } - void setOrigin (const int x, const int y) noexcept - { - if (isOnlyTranslated) - { - xOffset += x; - yOffset += y; - } - else - { - complexTransform = getTransformWith (AffineTransform::translation ((float) x, (float) y)); - } - } - - void addTransform (const AffineTransform& t) - { - if ((! isOnlyTranslated) - || (! t.isOnlyTranslation()) - || (int) (t.getTranslationX() * 256.0f) != 0 - || (int) (t.getTranslationY() * 256.0f) != 0) - { - complexTransform = getTransformWith (t); - isOnlyTranslated = false; - } - else - { - xOffset += (int) t.getTranslationX(); - yOffset += (int) t.getTranslationY(); - } - } - - float getScaleFactor() const - { - return isOnlyTranslated ? 1.0f : complexTransform.getScaleFactor(); - } - bool clipToRectangle (const Rectangle& r) { if (clip != nullptr) { - if (isOnlyTranslated) + if (transform.isOnlyTranslated) { cloneClipIfMultiplyReferenced(); - clip = clip->clipToRectangle (r.translated (xOffset, yOffset)); + clip = clip->clipToRectangle (transform.translated (r)); } else { @@ -1841,11 +1797,11 @@ public: { if (clip != nullptr) { - if (isOnlyTranslated) + if (transform.isOnlyTranslated) { cloneClipIfMultiplyReferenced(); RectangleList offsetList (r); - offsetList.offsetAll (xOffset, yOffset); + offsetList.offsetAll (transform.xOffset, transform.yOffset); clip = clip->clipToRectangleList (offsetList); } else @@ -1863,15 +1819,15 @@ public: { cloneClipIfMultiplyReferenced(); - if (isOnlyTranslated) + if (transform.isOnlyTranslated) { - clip = clip->excludeClipRectangle (r.translated (xOffset, yOffset)); + clip = clip->excludeClipRectangle (transform.translated (r)); } else { Path p; p.addRectangle (r.toFloat()); - p.applyTransform (complexTransform); + p.applyTransform (transform.complexTransform); p.addRectangle (clip->getClipBounds().toFloat()); p.setUsingNonZeroWinding (false); clip = clip->clipToPath (p, AffineTransform::identity); @@ -1881,12 +1837,12 @@ public: return clip != nullptr; } - void clipToPath (const Path& p, const AffineTransform& transform) + void clipToPath (const Path& p, const AffineTransform& t) { if (clip != nullptr) { cloneClipIfMultiplyReferenced(); - clip = clip->clipToPath (p, getTransformWith (transform)); + clip = clip->clipToPath (p, transform.getTransformWith (t)); } } @@ -1897,7 +1853,7 @@ public: if (sourceImage.hasAlphaChannel()) { cloneClipIfMultiplyReferenced(); - clip = clip->clipToImageAlpha (sourceImage, getTransformWith (t), + clip = clip->clipToImageAlpha (sourceImage, transform.getTransformWith (t), interpolationQuality != Graphics::lowResamplingQuality); } else @@ -1913,8 +1869,8 @@ public: { if (clip != nullptr) { - if (isOnlyTranslated) - return clip->clipRegionIntersects (r.translated (xOffset, yOffset)); + if (transform.isOnlyTranslated) + return clip->clipRegionIntersects (transform.translated (r)); else return getClipBounds().intersects (r); } @@ -1924,20 +1880,14 @@ public: Rectangle getUntransformedClipBounds() const { - return clip != nullptr ? clip->getClipBounds() : Rectangle(); + return clip != nullptr ? clip->getClipBounds() + : Rectangle(); } Rectangle getClipBounds() const { - if (clip != nullptr) - { - if (isOnlyTranslated) - return clip->getClipBounds().translated (-xOffset, -yOffset); - else - return clip->getClipBounds().toFloat().transformed (complexTransform.inverted()).getSmallestIntegerContainer(); - } - - return Rectangle(); + return clip != nullptr ? transform.deviceSpaceToUserSpace (clip->getClipBounds()) + : Rectangle(); } SavedState* beginTransparencyLayer (float opacity) @@ -1946,18 +1896,8 @@ public: SavedState* s = new SavedState (*this); s->image = Image (Image::ARGB, layerBounds.getWidth(), layerBounds.getHeight(), true); - s->compositionAlpha = opacity; - - if (s->isOnlyTranslated) - { - s->xOffset -= layerBounds.getX(); - s->yOffset -= layerBounds.getY(); - } - else - { - s->complexTransform = s->complexTransform.followedBy (AffineTransform::translation ((float) -layerBounds.getX(), - (float) -layerBounds.getY())); - } + s->transparencyLayerAlpha = opacity; + s->transform.moveOriginInDeviceSpace (-layerBounds.getX(), -layerBounds.getY()); s->cloneClipIfMultiplyReferenced(); s->clip = s->clip->translated (-layerBounds.getPosition()); @@ -1969,7 +1909,7 @@ public: const Rectangle layerBounds (getUntransformedClipBounds()); const ScopedPointer g (image.createLowLevelContext()); - g->setOpacity (layerState.compositionAlpha); + g->setOpacity (layerState.transparencyLayerAlpha); g->drawImage (layerState.image, AffineTransform::translation ((float) layerBounds.getX(), (float) layerBounds.getY()), false); } @@ -1979,17 +1919,17 @@ public: { if (clip != nullptr) { - if (isOnlyTranslated) + if (transform.isOnlyTranslated) { if (fillType.isColour()) { Image::BitmapData destData (image, Image::BitmapData::readWrite); - clip->fillRectWithColour (destData, r.translated (xOffset, yOffset), fillType.colour.getPixelARGB(), replaceContents); + clip->fillRectWithColour (destData, transform.translated (r), fillType.colour.getPixelARGB(), replaceContents); } else { const Rectangle totalClip (clip->getClipBounds()); - const Rectangle clipped (totalClip.getIntersection (r.translated (xOffset, yOffset))); + const Rectangle clipped (totalClip.getIntersection (transform.translated (r))); if (! clipped.isEmpty()) fillShape (new SoftwareRendererClasses::ClipRegion_RectangleList (clipped), false); @@ -2008,17 +1948,17 @@ public: { if (clip != nullptr) { - if (isOnlyTranslated) + if (transform.isOnlyTranslated) { if (fillType.isColour()) { Image::BitmapData destData (image, Image::BitmapData::readWrite); - clip->fillRectWithColour (destData, r.translated ((float) xOffset, (float) yOffset), fillType.colour.getPixelARGB()); + clip->fillRectWithColour (destData, transform.translated (r), fillType.colour.getPixelARGB()); } else { const Rectangle totalClip (clip->getClipBounds().toFloat()); - const Rectangle clipped (totalClip.getIntersection (r.translated ((float) xOffset, (float) yOffset))); + const Rectangle clipped (totalClip.getIntersection (transform.translated (r))); if (! clipped.isEmpty()) fillShape (new SoftwareRendererClasses::ClipRegion_EdgeTable (clipped), false); @@ -2033,28 +1973,28 @@ public: } } - void fillPath (const Path& path, const AffineTransform& transform) + void fillPath (const Path& path, const AffineTransform& t) { if (clip != nullptr) - fillShape (new SoftwareRendererClasses::ClipRegion_EdgeTable (clip->getClipBounds(), path, getTransformWith (transform)), false); + fillShape (new SoftwareRendererClasses::ClipRegion_EdgeTable (clip->getClipBounds(), path, transform.getTransformWith (t)), false); } void fillEdgeTable (const EdgeTable& edgeTable, const float x, const int y) { - jassert (isOnlyTranslated); + jassert (transform.isOnlyTranslated); if (clip != nullptr) { SoftwareRendererClasses::ClipRegion_EdgeTable* edgeTableClip = new SoftwareRendererClasses::ClipRegion_EdgeTable (edgeTable); SoftwareRendererClasses::ClipRegionBase::Ptr shapeToFill (edgeTableClip); - edgeTableClip->edgeTable.translate (x + xOffset, y + yOffset); + edgeTableClip->edgeTable.translate (x + transform.xOffset, y + transform.yOffset); fillShape (shapeToFill, false); } } - void drawGlyph (const Font& f, int glyphNumber, const AffineTransform& transform) + void drawGlyph (const Font& f, int glyphNumber, const AffineTransform& t) { - const ScopedPointer et (f.getTypeface()->getEdgeTableForGlyph (glyphNumber, getTransformWith (transform))); + const ScopedPointer et (f.getTypeface()->getEdgeTableForGlyph (glyphNumber, transform.getTransformWith (t))); if (et != nullptr && clip != nullptr) { @@ -2080,19 +2020,19 @@ public: ColourGradient g2 (*(fillType.gradient)); g2.multiplyOpacity (fillType.getOpacity()); - AffineTransform transform (getTransformWith (fillType.transform).translated (-0.5f, -0.5f)); + AffineTransform t (transform.getTransformWith (fillType.transform).translated (-0.5f, -0.5f)); - const bool isIdentity = transform.isOnlyTranslation(); + const bool isIdentity = t.isOnlyTranslation(); if (isIdentity) { // If our translation doesn't involve any distortion, we can speed it up.. - g2.point1.applyTransform (transform); - g2.point2.applyTransform (transform); - transform = AffineTransform::identity; + g2.point1.applyTransform (t); + g2.point2.applyTransform (t); + t = AffineTransform::identity; } - shapeToFill->fillAllWithGradient (destData, g2, transform, isIdentity); + shapeToFill->fillAllWithGradient (destData, g2, t, isIdentity); } else if (fillType.isTiledImage()) { @@ -2106,20 +2046,21 @@ public: } //============================================================================== - void renderImage (const Image& sourceImage, const AffineTransform& t, const SoftwareRendererClasses::ClipRegionBase* const tiledFillClipRegion) + void renderImage (const Image& sourceImage, const AffineTransform& trans, + const SoftwareRendererClasses::ClipRegionBase* const tiledFillClipRegion) { - const AffineTransform transform (getTransformWith (t)); + const AffineTransform t (transform.getTransformWith (trans)); const Image::BitmapData destData (image, Image::BitmapData::readWrite); const Image::BitmapData srcData (sourceImage, Image::BitmapData::readOnly); const int alpha = fillType.colour.getAlpha(); const bool betterQuality = (interpolationQuality != Graphics::lowResamplingQuality); - if (transform.isOnlyTranslation()) + if (t.isOnlyTranslation()) { // If our translation doesn't involve any distortion, just use a simple blit.. - int tx = (int) (transform.getTranslationX() * 256.0f); - int ty = (int) (transform.getTranslationY() * 256.0f); + int tx = (int) (t.getTranslationX() * 256.0f); + int ty = (int) (t.getTranslationY() * 256.0f); if ((! betterQuality) || ((tx | ty) & 224) == 0) { @@ -2149,12 +2090,12 @@ public: } } - if (transform.isSingularity()) + if (t.isSingularity()) return; if (tiledFillClipRegion != nullptr) { - tiledFillClipRegion->renderImageTransformed (destData, srcData, alpha, transform, betterQuality, true); + tiledFillClipRegion->renderImageTransformed (destData, srcData, alpha, t, betterQuality, true); } else { @@ -2162,52 +2103,30 @@ public: p.addRectangle (sourceImage.getBounds()); SoftwareRendererClasses::ClipRegionBase::Ptr c (clip->clone()); - c = c->clipToPath (p, transform); + c = c->clipToPath (p, t); if (c != nullptr) - c->renderImageTransformed (destData, srcData, alpha, transform, betterQuality, false); + c->renderImageTransformed (destData, srcData, alpha, t, betterQuality, false); } } //============================================================================== Image image; SoftwareRendererClasses::ClipRegionBase::Ptr clip; - -private: - AffineTransform complexTransform; - int xOffset, yOffset; - float compositionAlpha; - -public: - bool isOnlyTranslated; - + RenderingHelpers::TranslationOrTransform transform; Font font; FillType fillType; Graphics::ResamplingQuality interpolationQuality; private: + float transparencyLayerAlpha; + void cloneClipIfMultiplyReferenced() { if (clip->getReferenceCount() > 1) clip = clip->clone(); } - const AffineTransform getTransform() const - { - if (isOnlyTranslated) - return AffineTransform::translation ((float) xOffset, (float) yOffset); - - return complexTransform; - } - - const AffineTransform getTransformWith (const AffineTransform& userTransform) const - { - if (isOnlyTranslated) - return userTransform.translated ((float) xOffset, (float) yOffset); - - return userTransform.followedBy (complexTransform); - } - SavedState& operator= (const SavedState&); }; @@ -2238,17 +2157,17 @@ bool LowLevelGraphicsSoftwareRenderer::isVectorDevice() const //============================================================================== void LowLevelGraphicsSoftwareRenderer::setOrigin (int x, int y) { - currentState->setOrigin (x, y); + currentState->transform.setOrigin (x, y); } void LowLevelGraphicsSoftwareRenderer::addTransform (const AffineTransform& transform) { - currentState->addTransform (transform); + currentState->transform.addTransform (transform); } float LowLevelGraphicsSoftwareRenderer::getScaleFactor() { - return currentState->getScaleFactor(); + return currentState->transform.getScaleFactor(); } bool LowLevelGraphicsSoftwareRenderer::clipToRectangle (const Rectangle& r) @@ -2288,7 +2207,7 @@ Rectangle LowLevelGraphicsSoftwareRenderer::getClipBounds() const bool LowLevelGraphicsSoftwareRenderer::isClipEmpty() const { - return currentState->clip == 0; + return currentState->clip == nullptr; } //============================================================================== @@ -2376,93 +2295,6 @@ void LowLevelGraphicsSoftwareRenderer::drawHorizontalLine (const int y, float le currentState->fillRect (Rectangle (left, (float) y, right - left, 1.0f)); } -//============================================================================== -template -class GlyphCache : private DeletedAtShutdown -{ -public: - GlyphCache() - : accessCounter (0), hits (0), misses (0) - { - addNewGlyphSlots (120); - } - - ~GlyphCache() - { - getSingletonPointer() = nullptr; - } - - static GlyphCache& getInstance() - { - GlyphCache*& g = getSingletonPointer(); - - if (g == nullptr) - g = new GlyphCache(); - - return *g; - } - - //============================================================================== - void drawGlyph (RenderTargetType& target, const Font& font, const int glyphNumber, float x, float y) - { - ++accessCounter; - int oldestCounter = std::numeric_limits::max(); - CachedGlyphType* oldest = nullptr; - - for (int i = glyphs.size(); --i >= 0;) - { - CachedGlyphType* const glyph = glyphs.getUnchecked (i); - - if (glyph->glyph == glyphNumber && glyph->font == font) - { - ++hits; - glyph->lastAccessCount = accessCounter; - glyph->draw (target, x, y); - return; - } - - if (glyph->lastAccessCount <= oldestCounter) - { - oldestCounter = glyph->lastAccessCount; - oldest = glyph; - } - } - - if (hits + ++misses > (glyphs.size() << 4)) - { - if (misses * 2 > hits) - addNewGlyphSlots (32); - - hits = misses = 0; - oldest = glyphs.getLast(); - } - - jassert (oldest != nullptr); - oldest->lastAccessCount = accessCounter; - oldest->generate (font, glyphNumber); - oldest->draw (target, x, y); - } - -private: - friend class OwnedArray ; - OwnedArray glyphs; - int accessCounter, hits, misses; - - void addNewGlyphSlots (int num) - { - while (--num >= 0) - glyphs.add (new CachedGlyphType()); - } - - static GlyphCache*& getSingletonPointer() noexcept - { - static GlyphCache* g = nullptr; - return g; - } - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GlyphCache); -}; - //============================================================================== class CachedGlyphEdgeTable { @@ -2507,9 +2339,9 @@ void LowLevelGraphicsSoftwareRenderer::drawGlyph (int glyphNumber, const AffineT { Font& f = currentState->font; - if (transform.isOnlyTranslation() && currentState->isOnlyTranslated) + if (transform.isOnlyTranslation() && currentState->transform.isOnlyTranslated) { - GlyphCache ::getInstance() + RenderingHelpers::GlyphCache ::getInstance() .drawGlyph (*currentState, f, glyphNumber, transform.getTranslationX(), transform.getTranslationY()); diff --git a/modules/juce_graphics/juce_graphics.cpp b/modules/juce_graphics/juce_graphics.cpp index 6b385bdf72..89cc43344b 100644 --- a/modules/juce_graphics/juce_graphics.cpp +++ b/modules/juce_graphics/juce_graphics.cpp @@ -54,6 +54,8 @@ #endif //============================================================================== +#include "native/juce_RenderingHelpers.h" + // START_AUTOINCLUDE colour/*.cpp, geometry/*.cpp, placement/*.cpp, contexts/*.cpp, images/*.cpp, // image_formats/*.cpp, fonts/*.cpp, effects/*.cpp #include "colour/juce_Colour.cpp" diff --git a/modules/juce_graphics/native/juce_RenderingHelpers.h b/modules/juce_graphics/native/juce_RenderingHelpers.h new file mode 100644 index 0000000000..8054980565 --- /dev/null +++ b/modules/juce_graphics/native/juce_RenderingHelpers.h @@ -0,0 +1,230 @@ +/* + ============================================================================== + + This file is part of the JUCE library - "Jules' Utility Class Extensions" + Copyright 2004-11 by Raw Material Software Ltd. + + ------------------------------------------------------------------------------ + + JUCE can be redistributed and/or modified under the terms of the GNU General + Public License (Version 2), as published by the Free Software Foundation. + A copy of the license is included in the JUCE distribution, or can be found + online at www.gnu.org/licenses. + + JUCE is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + ------------------------------------------------------------------------------ + + To release a closed-source product which uses JUCE, commercial licenses are + available: visit www.rawmaterialsoftware.com/juce for more information. + + ============================================================================== +*/ + +#ifndef __JUCE_RENDERINGHELPERS_JUCEHEADER__ +#define __JUCE_RENDERINGHELPERS_JUCEHEADER__ + +BEGIN_JUCE_NAMESPACE + +namespace RenderingHelpers +{ + +//============================================================================== +/** Holds either a simple integer translation, or an affine transform. +*/ +class TranslationOrTransform +{ +public: + TranslationOrTransform (int xOffset_, int yOffset_) noexcept + : xOffset (xOffset_), yOffset (yOffset_), isOnlyTranslated (true) + { + } + + TranslationOrTransform (const TranslationOrTransform& other) noexcept + : complexTransform (other.complexTransform), + xOffset (other.xOffset), yOffset (other.yOffset), + isOnlyTranslated (other.isOnlyTranslated) + { + } + + AffineTransform getTransform() const noexcept + { + return isOnlyTranslated ? AffineTransform::translation ((float) xOffset, (float) yOffset) + : complexTransform; + } + + AffineTransform getTransformWith (const AffineTransform& userTransform) const noexcept + { + return isOnlyTranslated ? userTransform.translated ((float) xOffset, (float) yOffset) + : userTransform.followedBy (complexTransform); + } + + void setOrigin (const int x, const int y) noexcept + { + if (isOnlyTranslated) + { + xOffset += x; + yOffset += y; + } + else + { + complexTransform = AffineTransform::translation ((float) x, (float) y) + .followedBy (complexTransform); + } + } + + void addTransform (const AffineTransform& t) noexcept + { + if (isOnlyTranslated + && t.isOnlyTranslation() + && isIntegerTranlation (t)) + { + xOffset += (int) t.getTranslationX(); + yOffset += (int) t.getTranslationY(); + } + else + { + complexTransform = getTransformWith (t); + isOnlyTranslated = false; + } + } + + float getScaleFactor() const noexcept + { + return isOnlyTranslated ? 1.0f : complexTransform.getScaleFactor(); + } + + void moveOriginInDeviceSpace (const int dx, const int dy) noexcept + { + if (isOnlyTranslated) + { + xOffset += dx; + yOffset += dy; + } + else + { + complexTransform = complexTransform.translated ((float) dx, (float) dx); + } + } + + template + Rectangle translated (const Rectangle& r) const noexcept + { + jassert (isOnlyTranslated); + return r.translated (static_cast (xOffset), + static_cast (yOffset)); + } + + Rectangle deviceSpaceToUserSpace (const Rectangle& r) const noexcept + { + return isOnlyTranslated ? r.translated (-xOffset, -yOffset) + : r.toFloat().transformed (complexTransform.inverted()).getSmallestIntegerContainer(); + } + + AffineTransform complexTransform; + int xOffset, yOffset; + bool isOnlyTranslated; + +private: + static inline bool isIntegerTranlation (const AffineTransform& t) noexcept + { + const int tx = (int) (t.getTranslationX() * 256.0f); + const int ty = (int) (t.getTranslationY() * 256.0f); + return ((tx | ty) & 0xf8) == 0; + } +}; + +//============================================================================== +template +class GlyphCache : private DeletedAtShutdown +{ +public: + GlyphCache() + : accessCounter (0), hits (0), misses (0) + { + addNewGlyphSlots (120); + } + + ~GlyphCache() + { + getSingletonPointer() = nullptr; + } + + static GlyphCache& getInstance() + { + GlyphCache*& g = getSingletonPointer(); + + if (g == nullptr) + g = new GlyphCache(); + + return *g; + } + + //============================================================================== + void drawGlyph (RenderTargetType& target, const Font& font, const int glyphNumber, float x, float y) + { + ++accessCounter; + int oldestCounter = std::numeric_limits::max(); + CachedGlyphType* oldest = nullptr; + + for (int i = glyphs.size(); --i >= 0;) + { + CachedGlyphType* const glyph = glyphs.getUnchecked (i); + + if (glyph->glyph == glyphNumber && glyph->font == font) + { + ++hits; + glyph->lastAccessCount = accessCounter; + glyph->draw (target, x, y); + return; + } + + if (glyph->lastAccessCount <= oldestCounter) + { + oldestCounter = glyph->lastAccessCount; + oldest = glyph; + } + } + + if (hits + ++misses > (glyphs.size() << 4)) + { + if (misses * 2 > hits) + addNewGlyphSlots (32); + + hits = misses = 0; + oldest = glyphs.getLast(); + } + + jassert (oldest != nullptr); + oldest->lastAccessCount = accessCounter; + oldest->generate (font, glyphNumber); + oldest->draw (target, x, y); + } + +private: + friend class OwnedArray ; + OwnedArray glyphs; + int accessCounter, hits, misses; + + void addNewGlyphSlots (int num) + { + while (--num >= 0) + glyphs.add (new CachedGlyphType()); + } + + static GlyphCache*& getSingletonPointer() noexcept + { + static GlyphCache* g = nullptr; + return g; + } + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GlyphCache); +}; + +} + +END_JUCE_NAMESPACE + +#endif // __JUCE_RENDERINGHELPERS_JUCEHEADER__ diff --git a/modules/juce_opengl/opengl/juce_OpenGLFrameBuffer.cpp b/modules/juce_opengl/opengl/juce_OpenGLFrameBuffer.cpp index 03f6f810ae..0cf7dce8b5 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLFrameBuffer.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLFrameBuffer.cpp @@ -311,6 +311,28 @@ bool OpenGLFrameBuffer::initialise (const Image& image) return false; } +bool OpenGLFrameBuffer::initialise (const OpenGLFrameBuffer& other) +{ + const Pimpl* const p = other.pimpl; + + if (p == nullptr) + { + pimpl = nullptr; + return true; + } + + if (initialise (p->width, p->height)) + { + pimpl->bind(); + glDisable (GL_BLEND); + glColor4f (1.0f, 1.0f, 1.0f, 1.0f); + other.drawAt (0, 0); + pimpl->unbind(); + } + + return false; +} + void OpenGLFrameBuffer::release() { pimpl = nullptr; diff --git a/modules/juce_opengl/opengl/juce_OpenGLFrameBuffer.h b/modules/juce_opengl/opengl/juce_OpenGLFrameBuffer.h index 6601af3af1..41c72aeb25 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLFrameBuffer.h +++ b/modules/juce_opengl/opengl/juce_OpenGLFrameBuffer.h @@ -55,6 +55,10 @@ public: */ bool initialise (const Image& content); + /** Tries to allocate a copy of another framebuffer. + */ + bool initialise (const OpenGLFrameBuffer& other); + /** Releases the buffer, if one has been allocated. Any saved state that was created with saveAndRelease() will also be freed by this call. */