| @@ -1796,10 +1796,6 @@ | |||
| <Option compile="0"/> | |||
| <Option link="0"/> | |||
| </Unit> | |||
| <Unit filename="../../../../modules/juce_graphics/geometry/juce_RectangleList.cpp"> | |||
| <Option compile="0"/> | |||
| <Option link="0"/> | |||
| </Unit> | |||
| <Unit filename="../../../../modules/juce_graphics/geometry/juce_RectangleList.h"> | |||
| <Option compile="0"/> | |||
| <Option link="0"/> | |||
| @@ -659,7 +659,6 @@ | |||
| B8B309972EBB7F07305ACCCA = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SliderPropertyComponent.h"; path = "../../../../modules/juce_gui_basics/properties/juce_SliderPropertyComponent.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| B8BEDDA33D5B1613213434F4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MouseCursor.cpp"; path = "../../../../modules/juce_gui_basics/mouse/juce_MouseCursor.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| B92070A7D5952D560DAD32C4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_GZIPCompressorOutputStream.cpp"; path = "../../../../modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| B945EB1DEE6D684E980B7428 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RectangleList.cpp"; path = "../../../../modules/juce_graphics/geometry/juce_RectangleList.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| B9F806910507E82E7BFB15E0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MemoryOutputStream.h"; path = "../../../../modules/juce_core/streams/juce_MemoryOutputStream.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| BA1E340A922D0D7E543563CF = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AttributedString.cpp"; path = "../../../../modules/juce_graphics/fonts/juce_AttributedString.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| BA5C7DE347A73A87F687703C = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ApplicationCommandTarget.h"; path = "../../../../modules/juce_gui_basics/commands/juce_ApplicationCommandTarget.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| @@ -1433,7 +1432,6 @@ | |||
| 82395D0DB15E012EDA1AC1FE, | |||
| B79595279502C1A11A4E8C36, | |||
| E27F0860F27023BAA9798B46, | |||
| B945EB1DEE6D684E980B7428, | |||
| F08EB921DB62255A4B6DE85A ); name = geometry; sourceTree = "<group>"; }; | |||
| 14995D34FE0826A52FA5262D = { isa = PBXGroup; children = ( | |||
| 43B98AB307841FAAB076B882, | |||
| @@ -1946,16 +1946,6 @@ | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Point.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Rectangle.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.cpp"> | |||
| <FileConfiguration Name="Debug|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| <FileConfiguration Name="Release|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.h"/> | |||
| </Filter> | |||
| <Filter Name="placement"> | |||
| @@ -1946,16 +1946,6 @@ | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Point.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Rectangle.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.cpp"> | |||
| <FileConfiguration Name="Debug|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| <FileConfiguration Name="Release|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.h"/> | |||
| </Filter> | |||
| <Filter Name="placement"> | |||
| @@ -541,9 +541,6 @@ | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.cpp"> | |||
| <ExcludedFromBuild>true</ExcludedFromBuild> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.cpp"> | |||
| <ExcludedFromBuild>true</ExcludedFromBuild> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\placement\juce_Justification.cpp"> | |||
| <ExcludedFromBuild>true</ExcludedFromBuild> | |||
| </ClCompile> | |||
| @@ -772,9 +772,6 @@ | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.cpp"> | |||
| <Filter>Juce Modules\juce_graphics\geometry</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.cpp"> | |||
| <Filter>Juce Modules\juce_graphics\geometry</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\placement\juce_Justification.cpp"> | |||
| <Filter>Juce Modules\juce_graphics\placement</Filter> | |||
| </ClCompile> | |||
| @@ -547,9 +547,6 @@ | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.cpp"> | |||
| <ExcludedFromBuild>true</ExcludedFromBuild> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.cpp"> | |||
| <ExcludedFromBuild>true</ExcludedFromBuild> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\placement\juce_Justification.cpp"> | |||
| <ExcludedFromBuild>true</ExcludedFromBuild> | |||
| </ClCompile> | |||
| @@ -772,9 +772,6 @@ | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.cpp"> | |||
| <Filter>Juce Modules\juce_graphics\geometry</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.cpp"> | |||
| <Filter>Juce Modules\juce_graphics\geometry</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\placement\juce_Justification.cpp"> | |||
| <Filter>Juce Modules\juce_graphics\placement</Filter> | |||
| </ClCompile> | |||
| @@ -49,6 +49,10 @@ | |||
| //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES | |||
| #endif | |||
| #ifndef JUCE_INCLUDE_ZLIB_CODE | |||
| //#define JUCE_INCLUDE_ZLIB_CODE | |||
| #endif | |||
| //============================================================================== | |||
| // juce_graphics flags: | |||
| @@ -95,7 +95,7 @@ inline void drawResizableBorder (Graphics& g, int w, int h, | |||
| inline void drawMouseOverCorners (Graphics& g, int w, int h) | |||
| { | |||
| RectangleList r (Rectangle<int> (0, 0, w, h)); | |||
| RectangleList<int> r (Rectangle<int> (0, 0, w, h)); | |||
| r.subtract (Rectangle<int> (1, 1, w - 2, h - 2)); | |||
| const int size = jmin (w / 3, h / 3, 12); | |||
| @@ -5,6 +5,7 @@ LOCAL_PATH := $(call my-dir) | |||
| include $(CLEAR_VARS) | |||
| LOCAL_ARM_MODE := arm | |||
| LOCAL_MODULE := juce_jni | |||
| LOCAL_SRC_FILES := \ | |||
| ../../../Source/ApplicationStartup.cpp\ | |||
| @@ -1973,10 +1973,6 @@ | |||
| <Option compile="0"/> | |||
| <Option link="0"/> | |||
| </Unit> | |||
| <Unit filename="../../../../modules/juce_graphics/geometry/juce_RectangleList.cpp"> | |||
| <Option compile="0"/> | |||
| <Option link="0"/> | |||
| </Unit> | |||
| <Unit filename="../../../../modules/juce_graphics/geometry/juce_RectangleList.h"> | |||
| <Option compile="0"/> | |||
| <Option link="0"/> | |||
| @@ -748,7 +748,6 @@ | |||
| BF2093D486040BEC64210EBB = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ColourSelector.h"; path = "../../../../modules/juce_gui_extra/misc/juce_ColourSelector.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| BF59C96BC3BCB29CCB421861 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_graphics.h"; path = "../../../../modules/juce_graphics/juce_graphics.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| BF6F272194D16055D6A90D94 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ComponentListener.cpp"; path = "../../../../modules/juce_gui_basics/components/juce_ComponentListener.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| BF76B8C5007732311AF50543 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RectangleList.cpp"; path = "../../../../modules/juce_graphics/geometry/juce_RectangleList.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| C03AF9257B94504D7270416A = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ImagePreviewComponent.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_ImagePreviewComponent.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| C0608375ACE89B422431E9A9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ApplicationCommandManager.h"; path = "../../../../modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| C069C5FCE1539E9F85C7F29E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FilenameComponent.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FilenameComponent.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| @@ -1556,7 +1555,6 @@ | |||
| D4DC657E222FE2BDE92EC58E, | |||
| 33A84E7FDD64568649CC89BF, | |||
| 1089C7A1FF43033FDA63F711, | |||
| BF76B8C5007732311AF50543, | |||
| 38E0255E6BB9600DEECD39F8 ); name = geometry; sourceTree = "<group>"; }; | |||
| BB4F117CD3A2EA9CE8390AD0 = { isa = PBXGroup; children = ( | |||
| DF47E8197FF5A9309C062C61, | |||
| @@ -2576,16 +2576,6 @@ | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Point.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Rectangle.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.cpp"> | |||
| <FileConfiguration Name="Debug|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| <FileConfiguration Name="Release|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.h"/> | |||
| </Filter> | |||
| <Filter Name="placement"> | |||
| @@ -2576,16 +2576,6 @@ | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Point.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Rectangle.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.cpp"> | |||
| <FileConfiguration Name="Debug|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| <FileConfiguration Name="Release|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.h"/> | |||
| </Filter> | |||
| <Filter Name="placement"> | |||
| @@ -719,9 +719,6 @@ | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.cpp"> | |||
| <ExcludedFromBuild>true</ExcludedFromBuild> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.cpp"> | |||
| <ExcludedFromBuild>true</ExcludedFromBuild> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\placement\juce_Justification.cpp"> | |||
| <ExcludedFromBuild>true</ExcludedFromBuild> | |||
| </ClCompile> | |||
| @@ -976,9 +976,6 @@ | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.cpp"> | |||
| <Filter>Juce Modules\juce_graphics\geometry</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.cpp"> | |||
| <Filter>Juce Modules\juce_graphics\geometry</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\placement\juce_Justification.cpp"> | |||
| <Filter>Juce Modules\juce_graphics\placement</Filter> | |||
| </ClCompile> | |||
| @@ -725,9 +725,6 @@ | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.cpp"> | |||
| <ExcludedFromBuild>true</ExcludedFromBuild> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.cpp"> | |||
| <ExcludedFromBuild>true</ExcludedFromBuild> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\placement\juce_Justification.cpp"> | |||
| <ExcludedFromBuild>true</ExcludedFromBuild> | |||
| </ClCompile> | |||
| @@ -976,9 +976,6 @@ | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.cpp"> | |||
| <Filter>Juce Modules\juce_graphics\geometry</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.cpp"> | |||
| <Filter>Juce Modules\juce_graphics\geometry</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\..\..\modules\juce_graphics\placement\juce_Justification.cpp"> | |||
| <Filter>Juce Modules\juce_graphics\placement</Filter> | |||
| </ClCompile> | |||
| @@ -740,7 +740,6 @@ | |||
| BF2093D486040BEC64210EBB = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ColourSelector.h"; path = "../../../../modules/juce_gui_extra/misc/juce_ColourSelector.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| BF59C96BC3BCB29CCB421861 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_graphics.h"; path = "../../../../modules/juce_graphics/juce_graphics.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| BF6F272194D16055D6A90D94 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ComponentListener.cpp"; path = "../../../../modules/juce_gui_basics/components/juce_ComponentListener.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| BF76B8C5007732311AF50543 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RectangleList.cpp"; path = "../../../../modules/juce_graphics/geometry/juce_RectangleList.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| C03AF9257B94504D7270416A = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ImagePreviewComponent.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_ImagePreviewComponent.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| C0608375ACE89B422431E9A9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ApplicationCommandManager.h"; path = "../../../../modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| C069C5FCE1539E9F85C7F29E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_FilenameComponent.h"; path = "../../../../modules/juce_gui_basics/filebrowser/juce_FilenameComponent.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| @@ -1546,7 +1545,6 @@ | |||
| D4DC657E222FE2BDE92EC58E, | |||
| 33A84E7FDD64568649CC89BF, | |||
| 1089C7A1FF43033FDA63F711, | |||
| BF76B8C5007732311AF50543, | |||
| 38E0255E6BB9600DEECD39F8 ); name = geometry; sourceTree = "<group>"; }; | |||
| BB4F117CD3A2EA9CE8390AD0 = { isa = PBXGroup; children = ( | |||
| DF47E8197FF5A9309C062C61, | |||
| @@ -432,7 +432,6 @@ | |||
| 6A3C840E1B6CD34CA8C8DB4B = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_GroupComponent.h"; path = "../../../../modules/juce_gui_basics/layout/juce_GroupComponent.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| 6A593B7ADFAC09D547EA809D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = AUCarbonViewBase.cpp; path = Extras/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/AUCarbonViewBase.cpp; sourceTree = "DEVELOPER_DIR"; }; | |||
| 6AAAA6BD093B9CCD11BC26EC = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ListenerList.h"; path = "../../../../modules/juce_events/broadcasters/juce_ListenerList.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| 6AB37A1375F5973557FB034E = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RectangleList.cpp"; path = "../../../../modules/juce_graphics/geometry/juce_RectangleList.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| 6B5564F5E6A5B70B890C146D = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_WindowsMediaAudioFormat.h"; path = "../../../../modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| 6C4AD1B0CA254C16E38609DD = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TextEditorKeyMapper.h"; path = "../../../../modules/juce_gui_basics/keyboard/juce_TextEditorKeyMapper.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| 6C5452492262FE01944BE60C = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_TableHeaderComponent.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| @@ -1519,7 +1518,6 @@ | |||
| 42458330B018CCF81D0931CA, | |||
| 4514B5F7DBC9B5A3E014C4CA, | |||
| 5EE4BB25075E3ACDCFCE14D2, | |||
| 6AB37A1375F5973557FB034E, | |||
| A1A74C33F871DF7D5E3C4B65 ); name = geometry; sourceTree = "<group>"; }; | |||
| 81AE068FB11A7B2265764318 = { isa = PBXGroup; children = ( | |||
| 53ADE0EF49550FB565B3A0A5, | |||
| @@ -2456,16 +2456,6 @@ | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Point.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Rectangle.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.cpp"> | |||
| <FileConfiguration Name="Debug|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| <FileConfiguration Name="Release|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.h"/> | |||
| </Filter> | |||
| <Filter Name="placement"> | |||
| @@ -2456,16 +2456,6 @@ | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Point.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Rectangle.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.cpp"> | |||
| <FileConfiguration Name="Debug|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| <FileConfiguration Name="Release|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.h"/> | |||
| </Filter> | |||
| <Filter Name="placement"> | |||
| @@ -123,6 +123,10 @@ | |||
| //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES | |||
| #endif | |||
| #ifndef JUCE_INCLUDE_ZLIB_CODE | |||
| //#define JUCE_INCLUDE_ZLIB_CODE | |||
| #endif | |||
| //============================================================================== | |||
| // juce_graphics flags: | |||
| @@ -777,7 +777,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; }; | |||
| @@ -800,6 +799,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"; }; | |||
| @@ -831,7 +831,6 @@ | |||
| E5FEEAA0CF737C7F947FD9DD = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Desktop.h"; path = "../../../../modules/juce_gui_basics/components/juce_Desktop.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| E64782A3957A60231A396D3D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = "juce_ios_Windowing.mm"; path = "../../../../modules/juce_gui_basics/native/juce_ios_Windowing.mm"; sourceTree = "SOURCE_ROOT"; }; | |||
| E66AB26776DD0039834DBC76 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CustomTypeface.h"; path = "../../../../modules/juce_graphics/fonts/juce_CustomTypeface.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| E682272A2E1A3947D3A9E452 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_RectangleList.cpp"; path = "../../../../modules/juce_graphics/geometry/juce_RectangleList.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| E6E9A8E11791B4B4D6B3E6D4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_UndoManager.cpp"; path = "../../../../modules/juce_data_structures/undomanager/juce_UndoManager.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| E6EDE8F1BBF28362AC9E1F28 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ScopedPointer.h"; path = "../../../../modules/juce_core/memory/juce_ScopedPointer.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| E7734E1F585ACB33420E44B4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_DirectSound.cpp"; path = "../../../../modules/juce_audio_devices/native/juce_win32_DirectSound.cpp"; sourceTree = "SOURCE_ROOT"; }; | |||
| @@ -1477,7 +1476,6 @@ | |||
| 3287ECA0DE90C0BCF3CAE6C2, | |||
| 15FBAE360A9B69D6DB38FF22, | |||
| E7F0E3EF611F21E0B80C7216, | |||
| E682272A2E1A3947D3A9E452, | |||
| BC12698889AAD84B83FA7A21 ); name = geometry; sourceTree = "<group>"; }; | |||
| 9F3AAF568F1D887C6A73CC41 = { isa = PBXGroup; children = ( | |||
| FBD139239758935DC4B678F1, | |||
| @@ -2499,16 +2499,6 @@ | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Point.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Rectangle.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.cpp"> | |||
| <FileConfiguration Name="Debug|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| <FileConfiguration Name="Release|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.h"/> | |||
| </Filter> | |||
| <Filter Name="placement"> | |||
| @@ -2499,16 +2499,6 @@ | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Point.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Rectangle.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.cpp"> | |||
| <FileConfiguration Name="Debug|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| <FileConfiguration Name="Release|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.h"/> | |||
| </Filter> | |||
| <Filter Name="placement"> | |||
| @@ -125,6 +125,10 @@ | |||
| //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES | |||
| #endif | |||
| #ifndef JUCE_INCLUDE_ZLIB_CODE | |||
| //#define JUCE_INCLUDE_ZLIB_CODE | |||
| #endif | |||
| //============================================================================== | |||
| // juce_graphics flags: | |||
| @@ -43,5 +43,9 @@ | |||
| //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES | |||
| #endif | |||
| #ifndef JUCE_INCLUDE_ZLIB_CODE | |||
| //#define JUCE_INCLUDE_ZLIB_CODE | |||
| #endif | |||
| #endif // __JUCE_APPCONFIG_3T6YQETY1__ | |||
| @@ -211,7 +211,6 @@ | |||
| 4A20547D0C763ABB1DE5A9C4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Slider.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_Slider.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| 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"; }; | |||
| @@ -987,7 +986,6 @@ | |||
| 6889EF825EA839830C733D07, | |||
| 3B51C055A70A99CDCEDFA399, | |||
| 189CC2967B6148BE990281E8, | |||
| 4BCEEF3FC9849208FF6B1BD7, | |||
| 9EF2F14290768DC26DBA6149 ); name = geometry; sourceTree = "<group>"; }; | |||
| C8E76BBA092B9546D62BFFE4 = { isa = PBXGroup; children = ( | |||
| 79E7E37683CACE292A596CEA, | |||
| @@ -1482,16 +1482,6 @@ | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Point.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Rectangle.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.cpp"> | |||
| <FileConfiguration Name="Debug|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| <FileConfiguration Name="Release|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.h"/> | |||
| </Filter> | |||
| <Filter Name="placement"> | |||
| @@ -1482,16 +1482,6 @@ | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Point.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_Rectangle.h"/> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.cpp"> | |||
| <FileConfiguration Name="Debug|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| <FileConfiguration Name="Release|Win32" | |||
| ExcludedFromBuild="true"> | |||
| <Tool Name="VCCLCompilerTool"/> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File RelativePath="..\..\..\..\modules\juce_graphics\geometry\juce_RectangleList.h"/> | |||
| </Filter> | |||
| <Filter Name="placement"> | |||
| @@ -209,7 +209,6 @@ | |||
| 4A20547D0C763ABB1DE5A9C4 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Slider.h"; path = "../../../../modules/juce_gui_basics/widgets/juce_Slider.h"; sourceTree = "SOURCE_ROOT"; }; | |||
| 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"; }; | |||
| @@ -985,7 +984,6 @@ | |||
| 6889EF825EA839830C733D07, | |||
| 3B51C055A70A99CDCEDFA399, | |||
| 189CC2967B6148BE990281E8, | |||
| 4BCEEF3FC9849208FF6B1BD7, | |||
| 9EF2F14290768DC26DBA6149 ); name = geometry; sourceTree = "<group>"; }; | |||
| C8E76BBA092B9546D62BFFE4 = { isa = PBXGroup; children = ( | |||
| 79E7E37683CACE292A596CEA, | |||
| @@ -48,6 +48,10 @@ | |||
| //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES | |||
| #endif | |||
| #ifndef JUCE_INCLUDE_ZLIB_CODE | |||
| //#define JUCE_INCLUDE_ZLIB_CODE | |||
| #endif | |||
| //============================================================================== | |||
| // juce_graphics flags: | |||
| @@ -932,7 +932,7 @@ public: | |||
| r.size.width = component.getWidth(); | |||
| r.size.height = component.getHeight(); | |||
| [[view superview] setFrame: r]; | |||
| [view setFrame: NSMakeRect (0, 0, component.getWidth(), component.getHeight())]; | |||
| [view setFrame: makeNSRect (component.getLocalBounds())]; | |||
| [view setNeedsDisplay: YES]; | |||
| } | |||
| @@ -961,7 +961,7 @@ public: | |||
| static NSView* createViewFor (AudioProcessor* filter, JuceAU* au, AudioProcessorEditor* const editor) | |||
| { | |||
| EditorCompHolder* editorCompHolder = new EditorCompHolder (editor); | |||
| NSRect r = NSMakeRect (0, 0, editorCompHolder->getWidth(), editorCompHolder->getHeight()); | |||
| NSRect r = makeNSRect (editorCompHolder->getLocalBounds()); | |||
| static JuceUIViewClass cls; | |||
| NSView* view = [[cls.createInstance() initWithFrame: r] autorelease]; | |||
| @@ -999,7 +999,7 @@ public: | |||
| r.size.width = editor->getWidth(); | |||
| r.size.height = editor->getHeight(); | |||
| [[view superview] setFrame: r]; | |||
| [view setFrame: NSMakeRect (0, 0, editor->getWidth(), editor->getHeight())]; | |||
| [view setFrame: makeNSRect (editor->getLocalBounds())]; | |||
| [view setNeedsDisplay: YES]; | |||
| } | |||
| } | |||
| @@ -55,6 +55,15 @@ namespace | |||
| { | |||
| return [NSString string]; | |||
| } | |||
| template <typename RectangleType> | |||
| static NSRect makeNSRect (const RectangleType& r) noexcept | |||
| { | |||
| return NSMakeRect (static_cast <CGFloat> (r.getX()), | |||
| static_cast <CGFloat> (r.getY()), | |||
| static_cast <CGFloat> (r.getWidth()), | |||
| static_cast <CGFloat> (r.getHeight())); | |||
| } | |||
| } | |||
| //============================================================================== | |||
| @@ -85,7 +85,7 @@ bool Graphics::reduceClipRegion (const int x, const int y, const int w, const in | |||
| return reduceClipRegion (Rectangle<int> (x, y, w, h)); | |||
| } | |||
| bool Graphics::reduceClipRegion (const RectangleList& clipRegion) | |||
| bool Graphics::reduceClipRegion (const RectangleList<int>& clipRegion) | |||
| { | |||
| saveStateIfPending(); | |||
| return context.clipToRectangleList (clipRegion); | |||
| @@ -26,7 +26,7 @@ | |||
| #define JUCE_GRAPHICSCONTEXT_H_INCLUDED | |||
| #include "../fonts/juce_Font.h" | |||
| #include "../geometry/juce_Rectangle.h" | |||
| #include "../geometry/juce_RectangleList.h" | |||
| #include "../geometry/juce_PathStrokeType.h" | |||
| #include "../geometry/juce_Line.h" | |||
| #include "../colour/juce_Colours.h" | |||
| @@ -35,7 +35,6 @@ | |||
| class LowLevelGraphicsContext; | |||
| class Image; | |||
| class FillType; | |||
| class RectangleList; | |||
| //============================================================================== | |||
| @@ -597,7 +596,7 @@ public: | |||
| @returns true if the resulting clipping region is non-zero in size | |||
| @see setOrigin, clipRegionIntersects | |||
| */ | |||
| bool reduceClipRegion (const RectangleList& clipRegion); | |||
| bool reduceClipRegion (const RectangleList<int>& clipRegion); | |||
| /** Intersects the current clipping region with a path. | |||
| @@ -71,7 +71,7 @@ public: | |||
| virtual float getTargetDeviceScaleFactor() { return 1.0f; } | |||
| virtual bool clipToRectangle (const Rectangle<int>&) = 0; | |||
| virtual bool clipToRectangleList (const RectangleList&) = 0; | |||
| virtual bool clipToRectangleList (const RectangleList<int>&) = 0; | |||
| virtual void excludeClipRectangle (const Rectangle<int>&) = 0; | |||
| virtual void clipToPath (const Path&, const AffineTransform&) = 0; | |||
| virtual void clipToImageAlpha (const Image&, const AffineTransform&) = 0; | |||
| @@ -117,7 +117,7 @@ bool LowLevelGraphicsPostScriptRenderer::clipToRectangle (const Rectangle<int>& | |||
| return stateStack.getLast()->clip.clipTo (r.translated (stateStack.getLast()->xOffset, stateStack.getLast()->yOffset)); | |||
| } | |||
| bool LowLevelGraphicsPostScriptRenderer::clipToRectangleList (const RectangleList& clipRegion) | |||
| bool LowLevelGraphicsPostScriptRenderer::clipToRectangleList (const RectangleList<int>& clipRegion) | |||
| { | |||
| needToClip = true; | |||
| return stateStack.getLast()->clip.clipTo (clipRegion); | |||
| @@ -470,7 +470,7 @@ void LowLevelGraphicsPostScriptRenderer::drawImage (const Image& sourceImage, co | |||
| writeTransform (transform.translated ((float) stateStack.getLast()->xOffset, (float) stateStack.getLast()->yOffset) | |||
| .scaled (1.0f, -1.0f)); | |||
| RectangleList imageClip; | |||
| RectangleList<int> imageClip; | |||
| sourceImage.createSolidAreaMask (imageClip, 0.5f); | |||
| out << "newpath "; | |||
| @@ -52,7 +52,7 @@ public: | |||
| float getScaleFactor() override; | |||
| bool clipToRectangle (const Rectangle<int>&) override; | |||
| bool clipToRectangleList (const RectangleList&) override; | |||
| bool clipToRectangleList (const RectangleList<int>&) override; | |||
| void excludeClipRectangle (const Rectangle<int>&) override; | |||
| void clipToPath (const Path&, const AffineTransform&) override; | |||
| void clipToImageAlpha (const Image&, const AffineTransform&) override; | |||
| @@ -100,7 +100,7 @@ protected: | |||
| SavedState(); | |||
| ~SavedState(); | |||
| RectangleList clip; | |||
| RectangleList<int> clip; | |||
| int xOffset, yOffset; | |||
| FillType fillType; | |||
| Font font; | |||
| @@ -28,7 +28,7 @@ LowLevelGraphicsSoftwareRenderer::LowLevelGraphicsSoftwareRenderer (const Image& | |||
| } | |||
| LowLevelGraphicsSoftwareRenderer::LowLevelGraphicsSoftwareRenderer (const Image& image, Point<int> origin, | |||
| const RectangleList& initialClip) | |||
| const RectangleList<int>& initialClip) | |||
| : savedState (new RenderingHelpers::SoftwareRendererSavedState (image, initialClip, origin.x, origin.y)) | |||
| { | |||
| } | |||
| @@ -45,9 +45,9 @@ float LowLevelGraphicsSoftwareRenderer::getScaleFactor() | |||
| Rectangle<int> LowLevelGraphicsSoftwareRenderer::getClipBounds() const { return savedState->getClipBounds(); } | |||
| bool LowLevelGraphicsSoftwareRenderer::isClipEmpty() const { return savedState->clip == nullptr; } | |||
| bool LowLevelGraphicsSoftwareRenderer::clipToRectangle (const Rectangle<int>& r) { return savedState->clipToRectangle (r); } | |||
| bool LowLevelGraphicsSoftwareRenderer::clipToRectangleList (const RectangleList& r) { return savedState->clipToRectangleList (r); } | |||
| void LowLevelGraphicsSoftwareRenderer::excludeClipRectangle (const Rectangle<int>& r) { savedState->excludeClipRectangle (r); } | |||
| bool LowLevelGraphicsSoftwareRenderer::clipToRectangle (const Rectangle<int>& r) { return savedState->clipToRectangle (r); } | |||
| bool LowLevelGraphicsSoftwareRenderer::clipToRectangleList (const RectangleList<int>& r) { return savedState->clipToRectangleList (r); } | |||
| void LowLevelGraphicsSoftwareRenderer::excludeClipRectangle (const Rectangle<int>& r) { savedState->excludeClipRectangle (r); } | |||
| void LowLevelGraphicsSoftwareRenderer::clipToPath (const Path& path, const AffineTransform& transform) | |||
| { | |||
| @@ -42,7 +42,7 @@ public: | |||
| //============================================================================== | |||
| LowLevelGraphicsSoftwareRenderer (const Image& imageToRenderOnto); | |||
| LowLevelGraphicsSoftwareRenderer (const Image& imageToRenderOnto, Point<int> origin, | |||
| const RectangleList& initialClip); | |||
| const RectangleList<int>& initialClip); | |||
| ~LowLevelGraphicsSoftwareRenderer(); | |||
| bool isVectorDevice() const override; | |||
| @@ -50,7 +50,7 @@ public: | |||
| void addTransform (const AffineTransform&) override; | |||
| float getScaleFactor() override; | |||
| bool clipToRectangle (const Rectangle<int>&) override; | |||
| bool clipToRectangleList (const RectangleList&) override; | |||
| bool clipToRectangleList (const RectangleList<int>&) override; | |||
| void excludeClipRectangle (const Rectangle<int>&) override; | |||
| void clipToPath (const Path&, const AffineTransform&) override; | |||
| void clipToImageAlpha (const Image&, const AffineTransform&) override; | |||
| @@ -124,7 +124,7 @@ EdgeTable::EdgeTable (const Rectangle<int>& rectangleToAdd) | |||
| } | |||
| } | |||
| EdgeTable::EdgeTable (const RectangleList& rectanglesToAdd) | |||
| EdgeTable::EdgeTable (const RectangleList<int>& rectanglesToAdd) | |||
| : bounds (rectanglesToAdd.getBounds()), | |||
| maxEdgesPerLine (juce_edgeTableDefaultEdgesPerLine), | |||
| lineStrideElements ((juce_edgeTableDefaultEdgesPerLine << 1) + 1), | |||
| @@ -59,7 +59,7 @@ public: | |||
| explicit EdgeTable (const Rectangle<int>& rectangleToAdd); | |||
| /** Creates an edge table containing a rectangle list. */ | |||
| explicit EdgeTable (const RectangleList& rectanglesToAdd); | |||
| explicit EdgeTable (const RectangleList<int>& rectanglesToAdd); | |||
| /** Creates an edge table containing a rectangle. */ | |||
| explicit EdgeTable (const Rectangle<float>& rectangleToAdd); | |||
| @@ -26,7 +26,6 @@ | |||
| #define JUCE_RECTANGLE_H_INCLUDED | |||
| #include "juce_Point.h" | |||
| class RectangleList; | |||
| //============================================================================== | |||
| @@ -809,15 +808,15 @@ public: | |||
| JUCE_DEPRECATED_WITH_BODY (Rectangle transformed (const AffineTransform& t) const noexcept, { return transformedBy (t); }) | |||
| private: | |||
| friend class RectangleList; | |||
| template <typename OtherType> friend class Rectangle; | |||
| template <typename OtherType> friend class RectangleList; | |||
| Point<ValueType> pos; | |||
| ValueType w, h; | |||
| static int parseIntAfterSpace (const String& s) noexcept | |||
| { return s.getCharPointer().findEndOfWhitespace().getIntValue32(); } | |||
| template <typename OtherType> friend class Rectangle; | |||
| void copyWithRounding (Rectangle<int>& result) const noexcept { result = getSmallestIntegerContainer(); } | |||
| void copyWithRounding (Rectangle<float>& result) const noexcept { result = toFloat(); } | |||
| void copyWithRounding (Rectangle<double>& result) const noexcept { result = toDouble(); } | |||
| @@ -1,511 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2013 - Raw Material Software Ltd. | |||
| Permission is granted to use this software under the terms of either: | |||
| a) the GPL v2 (or any later version) | |||
| b) the Affero GPL v3 | |||
| Details of these licenses can be found 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.juce.com for more information. | |||
| ============================================================================== | |||
| */ | |||
| RectangleList::RectangleList() noexcept | |||
| { | |||
| } | |||
| RectangleList::RectangleList (const Rectangle<int>& rect) | |||
| { | |||
| addWithoutMerging (rect); | |||
| } | |||
| RectangleList::RectangleList (const RectangleList& other) | |||
| : rects (other.rects) | |||
| { | |||
| } | |||
| RectangleList& RectangleList::operator= (const RectangleList& other) | |||
| { | |||
| rects = other.rects; | |||
| return *this; | |||
| } | |||
| #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS | |||
| RectangleList::RectangleList (RectangleList&& other) noexcept | |||
| : rects (static_cast <Array <Rectangle<int> >&&> (other.rects)) | |||
| { | |||
| } | |||
| RectangleList& RectangleList::operator= (RectangleList&& other) noexcept | |||
| { | |||
| rects = static_cast <Array <Rectangle<int> >&&> (other.rects); | |||
| return *this; | |||
| } | |||
| #endif | |||
| RectangleList::~RectangleList() | |||
| { | |||
| } | |||
| //============================================================================== | |||
| void RectangleList::clear() | |||
| { | |||
| rects.clearQuick(); | |||
| } | |||
| Rectangle<int> RectangleList::getRectangle (const int index) const noexcept | |||
| { | |||
| if (isPositiveAndBelow (index, rects.size())) | |||
| return rects.getReference (index); | |||
| return Rectangle<int>(); | |||
| } | |||
| bool RectangleList::isEmpty() const noexcept | |||
| { | |||
| return rects.size() == 0; | |||
| } | |||
| //============================================================================== | |||
| RectangleList::Iterator::Iterator (const RectangleList& list) noexcept | |||
| : current (nullptr), | |||
| owner (list), | |||
| index (list.rects.size()) | |||
| { | |||
| } | |||
| RectangleList::Iterator::~Iterator() | |||
| { | |||
| } | |||
| bool RectangleList::Iterator::next() noexcept | |||
| { | |||
| if (--index >= 0) | |||
| { | |||
| current = &(owner.rects.getReference (index)); | |||
| return true; | |||
| } | |||
| return false; | |||
| } | |||
| //============================================================================== | |||
| void RectangleList::add (const Rectangle<int>& rect) | |||
| { | |||
| if (! rect.isEmpty()) | |||
| { | |||
| if (rects.size() == 0) | |||
| { | |||
| rects.add (rect); | |||
| } | |||
| else | |||
| { | |||
| bool anyOverlaps = false; | |||
| for (int j = rects.size(); --j >= 0;) | |||
| { | |||
| Rectangle<int>& ourRect = rects.getReference (j); | |||
| if (rect.intersects (ourRect)) | |||
| { | |||
| if (rect.contains (ourRect)) | |||
| rects.remove (j); | |||
| else if (! ourRect.reduceIfPartlyContainedIn (rect)) | |||
| anyOverlaps = true; | |||
| } | |||
| } | |||
| if (anyOverlaps && rects.size() > 0) | |||
| { | |||
| RectangleList r (rect); | |||
| for (int i = rects.size(); --i >= 0;) | |||
| { | |||
| const Rectangle<int>& ourRect = rects.getReference (i); | |||
| if (rect.intersects (ourRect)) | |||
| { | |||
| r.subtract (ourRect); | |||
| if (r.rects.size() == 0) | |||
| return; | |||
| } | |||
| } | |||
| rects.addArray (r.rects); | |||
| } | |||
| else | |||
| { | |||
| rects.add (rect); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| void RectangleList::addWithoutMerging (const Rectangle<int>& rect) | |||
| { | |||
| if (! rect.isEmpty()) | |||
| rects.add (rect); | |||
| } | |||
| void RectangleList::add (const int x, const int y, const int w, const int h) | |||
| { | |||
| add (Rectangle<int> (x, y, w, h)); | |||
| } | |||
| void RectangleList::add (const RectangleList& other) | |||
| { | |||
| for (const Rectangle<int>* r = other.begin(), * const e = other.end(); r != e; ++r) | |||
| add (*r); | |||
| } | |||
| void RectangleList::subtract (const Rectangle<int>& rect) | |||
| { | |||
| const int originalNumRects = rects.size(); | |||
| if (originalNumRects > 0) | |||
| { | |||
| const int x1 = rect.pos.x; | |||
| const int y1 = rect.pos.y; | |||
| const int x2 = x1 + rect.w; | |||
| const int y2 = y1 + rect.h; | |||
| for (int i = getNumRectangles(); --i >= 0;) | |||
| { | |||
| Rectangle<int>& r = rects.getReference (i); | |||
| const int rx1 = r.pos.x; | |||
| const int ry1 = r.pos.y; | |||
| const int rx2 = rx1 + r.w; | |||
| const int ry2 = ry1 + r.h; | |||
| if (! (x2 <= rx1 || x1 >= rx2 || y2 <= ry1 || y1 >= ry2)) | |||
| { | |||
| if (x1 > rx1 && x1 < rx2) | |||
| { | |||
| if (y1 <= ry1 && y2 >= ry2 && x2 >= rx2) | |||
| { | |||
| r.w = x1 - rx1; | |||
| } | |||
| else | |||
| { | |||
| r.pos.x = x1; | |||
| r.w = rx2 - x1; | |||
| rects.insert (++i, Rectangle<int> (rx1, ry1, x1 - rx1, ry2 - ry1)); | |||
| ++i; | |||
| } | |||
| } | |||
| else if (x2 > rx1 && x2 < rx2) | |||
| { | |||
| r.pos.x = x2; | |||
| r.w = rx2 - x2; | |||
| if (y1 > ry1 || y2 < ry2 || x1 > rx1) | |||
| { | |||
| rects.insert (++i, Rectangle<int> (rx1, ry1, x2 - rx1, ry2 - ry1)); | |||
| ++i; | |||
| } | |||
| } | |||
| else if (y1 > ry1 && y1 < ry2) | |||
| { | |||
| if (x1 <= rx1 && x2 >= rx2 && y2 >= ry2) | |||
| { | |||
| r.h = y1 - ry1; | |||
| } | |||
| else | |||
| { | |||
| r.pos.y = y1; | |||
| r.h = ry2 - y1; | |||
| rects.insert (++i, Rectangle<int> (rx1, ry1, rx2 - rx1, y1 - ry1)); | |||
| ++i; | |||
| } | |||
| } | |||
| else if (y2 > ry1 && y2 < ry2) | |||
| { | |||
| r.pos.y = y2; | |||
| r.h = ry2 - y2; | |||
| if (x1 > rx1 || x2 < rx2 || y1 > ry1) | |||
| { | |||
| rects.insert (++i, Rectangle<int> (rx1, ry1, rx2 - rx1, y2 - ry1)); | |||
| ++i; | |||
| } | |||
| } | |||
| else | |||
| { | |||
| rects.remove (i); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| bool RectangleList::subtract (const RectangleList& otherList) | |||
| { | |||
| for (int i = otherList.rects.size(); --i >= 0 && rects.size() > 0;) | |||
| subtract (otherList.rects.getReference (i)); | |||
| return rects.size() > 0; | |||
| } | |||
| bool RectangleList::clipTo (const Rectangle<int>& rect) | |||
| { | |||
| bool notEmpty = false; | |||
| if (rect.isEmpty()) | |||
| { | |||
| clear(); | |||
| } | |||
| else | |||
| { | |||
| for (int i = rects.size(); --i >= 0;) | |||
| { | |||
| Rectangle<int>& r = rects.getReference (i); | |||
| if (! rect.intersectRectangle (r.pos.x, r.pos.y, r.w, r.h)) | |||
| rects.remove (i); | |||
| else | |||
| notEmpty = true; | |||
| } | |||
| } | |||
| return notEmpty; | |||
| } | |||
| bool RectangleList::clipTo (const RectangleList& other) | |||
| { | |||
| if (rects.size() == 0) | |||
| return false; | |||
| RectangleList result; | |||
| for (int j = 0; j < rects.size(); ++j) | |||
| { | |||
| const Rectangle<int>& rect = rects.getReference (j); | |||
| for (int i = other.rects.size(); --i >= 0;) | |||
| { | |||
| Rectangle<int> r (other.rects.getReference (i)); | |||
| if (rect.intersectRectangle (r.pos.x, r.pos.y, r.w, r.h)) | |||
| result.rects.add (r); | |||
| } | |||
| } | |||
| swapWith (result); | |||
| return ! isEmpty(); | |||
| } | |||
| bool RectangleList::getIntersectionWith (const Rectangle<int>& rect, RectangleList& destRegion) const | |||
| { | |||
| destRegion.clear(); | |||
| if (! rect.isEmpty()) | |||
| { | |||
| for (int i = rects.size(); --i >= 0;) | |||
| { | |||
| Rectangle<int> r (rects.getReference (i)); | |||
| if (rect.intersectRectangle (r.pos.x, r.pos.y, r.w, r.h)) | |||
| destRegion.rects.add (r); | |||
| } | |||
| } | |||
| return destRegion.rects.size() > 0; | |||
| } | |||
| void RectangleList::swapWith (RectangleList& otherList) noexcept | |||
| { | |||
| rects.swapWith (otherList.rects); | |||
| } | |||
| //============================================================================== | |||
| void RectangleList::consolidate() | |||
| { | |||
| for (int i = 0; i < getNumRectangles() - 1; ++i) | |||
| { | |||
| Rectangle<int>& r = rects.getReference (i); | |||
| const int rx1 = r.pos.x; | |||
| const int ry1 = r.pos.y; | |||
| const int rx2 = rx1 + r.w; | |||
| const int ry2 = ry1 + r.h; | |||
| for (int j = rects.size(); --j > i;) | |||
| { | |||
| Rectangle<int>& r2 = rects.getReference (j); | |||
| const int jrx1 = r2.pos.x; | |||
| const int jry1 = r2.pos.y; | |||
| const int jrx2 = jrx1 + r2.w; | |||
| const int jry2 = jry1 + r2.h; | |||
| // if the vertical edges of any blocks are touching and their horizontals don't | |||
| // line up, split them horizontally.. | |||
| if (jrx1 == rx2 || jrx2 == rx1) | |||
| { | |||
| if (jry1 > ry1 && jry1 < ry2) | |||
| { | |||
| r.h = jry1 - ry1; | |||
| rects.add (Rectangle<int> (rx1, jry1, rx2 - rx1, ry2 - jry1)); | |||
| i = -1; | |||
| break; | |||
| } | |||
| if (jry2 > ry1 && jry2 < ry2) | |||
| { | |||
| r.h = jry2 - ry1; | |||
| rects.add (Rectangle<int> (rx1, jry2, rx2 - rx1, ry2 - jry2)); | |||
| i = -1; | |||
| break; | |||
| } | |||
| else if (ry1 > jry1 && ry1 < jry2) | |||
| { | |||
| r2.h = ry1 - jry1; | |||
| rects.add (Rectangle<int> (jrx1, ry1, jrx2 - jrx1, jry2 - ry1)); | |||
| i = -1; | |||
| break; | |||
| } | |||
| else if (ry2 > jry1 && ry2 < jry2) | |||
| { | |||
| r2.h = ry2 - jry1; | |||
| rects.add (Rectangle<int> (jrx1, ry2, jrx2 - jrx1, jry2 - ry2)); | |||
| i = -1; | |||
| break; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| for (int i = 0; i < rects.size() - 1; ++i) | |||
| { | |||
| Rectangle<int>& r = rects.getReference (i); | |||
| for (int j = rects.size(); --j > i;) | |||
| { | |||
| if (r.enlargeIfAdjacent (rects.getReference (j))) | |||
| { | |||
| rects.remove (j); | |||
| i = -1; | |||
| break; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| //============================================================================== | |||
| bool RectangleList::containsPoint (const int x, const int y) const noexcept | |||
| { | |||
| for (const Rectangle<int>* r = rects.begin(), * const e = rects.end(); r != e; ++r) | |||
| if (r->contains (x, y)) | |||
| return true; | |||
| return false; | |||
| } | |||
| bool RectangleList::containsRectangle (const Rectangle<int>& rectangleToCheck) const | |||
| { | |||
| if (rects.size() > 1) | |||
| { | |||
| RectangleList r (rectangleToCheck); | |||
| for (int i = rects.size(); --i >= 0;) | |||
| { | |||
| r.subtract (rects.getReference (i)); | |||
| if (r.rects.size() == 0) | |||
| return true; | |||
| } | |||
| } | |||
| else if (rects.size() > 0) | |||
| { | |||
| return rects.getReference (0).contains (rectangleToCheck); | |||
| } | |||
| return false; | |||
| } | |||
| bool RectangleList::intersectsRectangle (const Rectangle<int>& rectangleToCheck) const noexcept | |||
| { | |||
| for (const Rectangle<int>* r = rects.begin(), * const e = rects.end(); r != e; ++r) | |||
| if (r->intersects (rectangleToCheck)) | |||
| return true; | |||
| return false; | |||
| } | |||
| bool RectangleList::intersects (const RectangleList& other) const noexcept | |||
| { | |||
| for (const Rectangle<int>* r = rects.begin(), * const e = rects.end(); r != e; ++r) | |||
| if (other.intersectsRectangle (*r)) | |||
| return true; | |||
| return false; | |||
| } | |||
| Rectangle<int> RectangleList::getBounds() const noexcept | |||
| { | |||
| if (rects.size() <= 1) | |||
| { | |||
| if (rects.size() == 0) | |||
| return Rectangle<int>(); | |||
| return rects.getReference (0); | |||
| } | |||
| else | |||
| { | |||
| const Rectangle<int>& r = rects.getReference (0); | |||
| int minX = r.pos.x; | |||
| int minY = r.pos.y; | |||
| int maxX = minX + r.w; | |||
| int maxY = minY + r.h; | |||
| for (int i = rects.size(); --i > 0;) | |||
| { | |||
| const Rectangle<int>& r2 = rects.getReference (i); | |||
| minX = jmin (minX, r2.pos.x); | |||
| minY = jmin (minY, r2.pos.y); | |||
| maxX = jmax (maxX, r2.getRight()); | |||
| maxY = jmax (maxY, r2.getBottom()); | |||
| } | |||
| return Rectangle<int> (minX, minY, maxX - minX, maxY - minY); | |||
| } | |||
| } | |||
| void RectangleList::offsetAll (const int dx, const int dy) noexcept | |||
| { | |||
| for (Rectangle<int>* r = rects.begin(), * const e = rects.end(); r != e; ++r) | |||
| { | |||
| r->pos.x += dx; | |||
| r->pos.y += dy; | |||
| } | |||
| } | |||
| //============================================================================== | |||
| Path RectangleList::toPath() const | |||
| { | |||
| Path p; | |||
| for (int i = 0; i < rects.size(); ++i) | |||
| p.addRectangle (rects.getReference (i)); | |||
| return p; | |||
| } | |||
| @@ -39,33 +39,50 @@ | |||
| @see Rectangle | |||
| */ | |||
| class JUCE_API RectangleList | |||
| template <typename ValueType> | |||
| class RectangleList | |||
| { | |||
| public: | |||
| typedef Rectangle<ValueType> RectangleType; | |||
| //============================================================================== | |||
| /** Creates an empty RectangleList */ | |||
| RectangleList() noexcept; | |||
| RectangleList() noexcept {} | |||
| /** Creates a copy of another list */ | |||
| RectangleList (const RectangleList& other); | |||
| RectangleList (const RectangleList& other) : rects (other.rects) | |||
| { | |||
| } | |||
| /** Creates a list containing just one rectangle. */ | |||
| RectangleList (const Rectangle<int>& rect); | |||
| RectangleList (const RectangleType& rect) | |||
| { | |||
| addWithoutMerging (rect); | |||
| } | |||
| /** Copies this list from another one. */ | |||
| RectangleList& operator= (const RectangleList& other); | |||
| RectangleList& operator= (const RectangleList& other) | |||
| { | |||
| rects = other.rects; | |||
| return *this; | |||
| } | |||
| #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS | |||
| RectangleList (RectangleList&& other) noexcept; | |||
| RectangleList& operator= (RectangleList&& other) noexcept; | |||
| #endif | |||
| RectangleList (RectangleList&& other) noexcept | |||
| : rects (static_cast <Array <RectangleType >&&> (other.rects)) | |||
| { | |||
| } | |||
| /** Destructor. */ | |||
| ~RectangleList(); | |||
| RectangleList& operator= (RectangleList&& other) noexcept | |||
| { | |||
| rects = static_cast <Array <RectangleType >&&> (other.rects); | |||
| return *this; | |||
| } | |||
| #endif | |||
| //============================================================================== | |||
| /** Returns true if the region is empty. */ | |||
| bool isEmpty() const noexcept; | |||
| bool isEmpty() const noexcept { return rects.size() == 0; } | |||
| /** Returns the number of rectangles in the list. */ | |||
| int getNumRectangles() const noexcept { return rects.size(); } | |||
| @@ -75,48 +92,198 @@ public: | |||
| @returns the rectangle at the index, or an empty rectangle if the | |||
| index is out-of-range. | |||
| */ | |||
| Rectangle<int> getRectangle (int index) const noexcept; | |||
| RectangleType getRectangle (int index) const noexcept | |||
| { | |||
| if (isPositiveAndBelow (index, rects.size())) | |||
| return rects.getReference (index); | |||
| return RectangleType(); | |||
| } | |||
| //============================================================================== | |||
| /** Removes all rectangles to leave an empty region. */ | |||
| void clear(); | |||
| void clear() | |||
| { | |||
| rects.clearQuick(); | |||
| } | |||
| /** Merges a new rectangle into the list. | |||
| The rectangle being added will first be clipped to remove any parts of it | |||
| that overlap existing rectangles in the list. | |||
| that overlap existing rectangles in the list, and adjacent rectangles will be | |||
| merged into it. | |||
| */ | |||
| void add (int x, int y, int width, int height); | |||
| void add (const RectangleType& rect) | |||
| { | |||
| if (! rect.isEmpty()) | |||
| { | |||
| if (rects.size() == 0) | |||
| { | |||
| rects.add (rect); | |||
| } | |||
| else | |||
| { | |||
| bool anyOverlaps = false; | |||
| for (int j = rects.size(); --j >= 0;) | |||
| { | |||
| RectangleType& ourRect = rects.getReference (j); | |||
| if (rect.intersects (ourRect)) | |||
| { | |||
| if (rect.contains (ourRect)) | |||
| rects.remove (j); | |||
| else if (! ourRect.reduceIfPartlyContainedIn (rect)) | |||
| anyOverlaps = true; | |||
| } | |||
| } | |||
| if (anyOverlaps && rects.size() > 0) | |||
| { | |||
| RectangleList r (rect); | |||
| for (int i = rects.size(); --i >= 0;) | |||
| { | |||
| const RectangleType& ourRect = rects.getReference (i); | |||
| if (rect.intersects (ourRect)) | |||
| { | |||
| r.subtract (ourRect); | |||
| if (r.rects.size() == 0) | |||
| return; | |||
| } | |||
| } | |||
| rects.addArray (r.rects); | |||
| } | |||
| else | |||
| { | |||
| rects.add (rect); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| /** Merges a new rectangle into the list. | |||
| The rectangle being added will first be clipped to remove any parts of it | |||
| that overlap existing rectangles in the list, and adjacent rectangles will be | |||
| merged into it. | |||
| that overlap existing rectangles in the list. | |||
| */ | |||
| void add (const Rectangle<int>& rect); | |||
| void add (ValueType x, ValueType y, ValueType width, ValueType height) | |||
| { | |||
| add (RectangleType (x, y, width, height)); | |||
| } | |||
| /** Dumbly adds a rectangle to the list without checking for overlaps. | |||
| This simply adds the rectangle to the end, it doesn't merge it or remove | |||
| any overlapping bits. | |||
| */ | |||
| void addWithoutMerging (const Rectangle<int>& rect); | |||
| void addWithoutMerging (const RectangleType& rect) | |||
| { | |||
| if (! rect.isEmpty()) | |||
| rects.add (rect); | |||
| } | |||
| /** Merges another rectangle list into this one. | |||
| Any overlaps between the two lists will be clipped, so that the result is | |||
| the union of both lists. | |||
| */ | |||
| void add (const RectangleList& other); | |||
| void add (const RectangleList& other) | |||
| { | |||
| for (const RectangleType* r = other.begin(), * const e = other.end(); r != e; ++r) | |||
| add (*r); | |||
| } | |||
| /** Removes a rectangular region from the list. | |||
| Any rectangles in the list which overlap this will be clipped and subdivided | |||
| if necessary. | |||
| */ | |||
| void subtract (const Rectangle<int>& rect); | |||
| void subtract (const RectangleType& rect) | |||
| { | |||
| const int originalNumRects = rects.size(); | |||
| if (originalNumRects > 0) | |||
| { | |||
| const ValueType x1 = rect.pos.x; | |||
| const ValueType y1 = rect.pos.y; | |||
| const ValueType x2 = x1 + rect.w; | |||
| const ValueType y2 = y1 + rect.h; | |||
| for (int i = getNumRectangles(); --i >= 0;) | |||
| { | |||
| RectangleType& r = rects.getReference (i); | |||
| const ValueType rx1 = r.pos.x; | |||
| const ValueType ry1 = r.pos.y; | |||
| const ValueType rx2 = rx1 + r.w; | |||
| const ValueType ry2 = ry1 + r.h; | |||
| if (! (x2 <= rx1 || x1 >= rx2 || y2 <= ry1 || y1 >= ry2)) | |||
| { | |||
| if (x1 > rx1 && x1 < rx2) | |||
| { | |||
| if (y1 <= ry1 && y2 >= ry2 && x2 >= rx2) | |||
| { | |||
| r.w = x1 - rx1; | |||
| } | |||
| else | |||
| { | |||
| r.pos.x = x1; | |||
| r.w = rx2 - x1; | |||
| rects.insert (++i, RectangleType (rx1, ry1, x1 - rx1, ry2 - ry1)); | |||
| ++i; | |||
| } | |||
| } | |||
| else if (x2 > rx1 && x2 < rx2) | |||
| { | |||
| r.pos.x = x2; | |||
| r.w = rx2 - x2; | |||
| if (y1 > ry1 || y2 < ry2 || x1 > rx1) | |||
| { | |||
| rects.insert (++i, RectangleType (rx1, ry1, x2 - rx1, ry2 - ry1)); | |||
| ++i; | |||
| } | |||
| } | |||
| else if (y1 > ry1 && y1 < ry2) | |||
| { | |||
| if (x1 <= rx1 && x2 >= rx2 && y2 >= ry2) | |||
| { | |||
| r.h = y1 - ry1; | |||
| } | |||
| else | |||
| { | |||
| r.pos.y = y1; | |||
| r.h = ry2 - y1; | |||
| rects.insert (++i, RectangleType (rx1, ry1, rx2 - rx1, y1 - ry1)); | |||
| ++i; | |||
| } | |||
| } | |||
| else if (y2 > ry1 && y2 < ry2) | |||
| { | |||
| r.pos.y = y2; | |||
| r.h = ry2 - y2; | |||
| if (x1 > rx1 || x2 < rx2 || y1 > ry1) | |||
| { | |||
| rects.insert (++i, RectangleType (rx1, ry1, rx2 - rx1, y2 - ry1)); | |||
| ++i; | |||
| } | |||
| } | |||
| else | |||
| { | |||
| rects.remove (i); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| /** Removes all areas in another RectangleList from this one. | |||
| @@ -125,7 +292,14 @@ public: | |||
| @returns true if the resulting list is non-empty. | |||
| */ | |||
| bool subtract (const RectangleList& otherList); | |||
| bool subtract (const RectangleList& otherList) | |||
| { | |||
| for (int i = otherList.rects.size(); --i >= 0 && rects.size() > 0;) | |||
| subtract (otherList.rects.getReference (i)); | |||
| return rects.size() > 0; | |||
| } | |||
| /** Removes any areas of the region that lie outside a given rectangle. | |||
| @@ -136,7 +310,29 @@ public: | |||
| @see getIntersectionWith | |||
| */ | |||
| bool clipTo (const Rectangle<int>& rect); | |||
| bool clipTo (const RectangleType& rect) | |||
| { | |||
| bool notEmpty = false; | |||
| if (rect.isEmpty()) | |||
| { | |||
| clear(); | |||
| } | |||
| else | |||
| { | |||
| for (int i = rects.size(); --i >= 0;) | |||
| { | |||
| RectangleType& r = rects.getReference (i); | |||
| if (! rect.intersectRectangle (r.pos.x, r.pos.y, r.w, r.h)) | |||
| rects.remove (i); | |||
| else | |||
| notEmpty = true; | |||
| } | |||
| } | |||
| return notEmpty; | |||
| } | |||
| /** Removes any areas of the region that lie outside a given rectangle list. | |||
| @@ -147,7 +343,30 @@ public: | |||
| @see getIntersectionWith | |||
| */ | |||
| bool clipTo (const RectangleList& other); | |||
| bool clipTo (const RectangleList& other) | |||
| { | |||
| if (rects.size() == 0) | |||
| return false; | |||
| RectangleList result; | |||
| for (int j = 0; j < rects.size(); ++j) | |||
| { | |||
| const RectangleType& rect = rects.getReference (j); | |||
| for (int i = other.rects.size(); --i >= 0;) | |||
| { | |||
| RectangleType r (other.rects.getReference (i)); | |||
| if (rect.intersectRectangle (r.pos.x, r.pos.y, r.w, r.h)) | |||
| result.rects.add (r); | |||
| } | |||
| } | |||
| swapWith (result); | |||
| return ! isEmpty(); | |||
| } | |||
| /** Creates a region which is the result of clipping this one to a given rectangle. | |||
| @@ -158,21 +377,54 @@ public: | |||
| @see clipTo | |||
| */ | |||
| bool getIntersectionWith (const Rectangle<int>& rect, RectangleList& destRegion) const; | |||
| bool getIntersectionWith (const RectangleType& rect, RectangleList& destRegion) const | |||
| { | |||
| destRegion.clear(); | |||
| if (! rect.isEmpty()) | |||
| { | |||
| for (int i = rects.size(); --i >= 0;) | |||
| { | |||
| RectangleType r (rects.getReference (i)); | |||
| if (rect.intersectRectangle (r.pos.x, r.pos.y, r.w, r.h)) | |||
| destRegion.rects.add (r); | |||
| } | |||
| } | |||
| return destRegion.rects.size() > 0; | |||
| } | |||
| /** Swaps the contents of this and another list. | |||
| This swaps their internal pointers, so is hugely faster than using copy-by-value | |||
| to swap them. | |||
| */ | |||
| void swapWith (RectangleList& otherList) noexcept; | |||
| void swapWith (RectangleList& otherList) noexcept | |||
| { | |||
| rects.swapWith (otherList.rects); | |||
| } | |||
| //============================================================================== | |||
| /** Checks whether the region contains a given point. | |||
| @returns true if the point lies within one of the rectangles in the list | |||
| */ | |||
| bool containsPoint (Point<ValueType> point) const noexcept | |||
| { | |||
| for (const RectangleType* r = rects.begin(), * const e = rects.end(); r != e; ++r) | |||
| if (r->contains (point)) | |||
| return true; | |||
| return false; | |||
| } | |||
| /** Checks whether the region contains a given point. | |||
| @returns true if the point lies within one of the rectangles in the list | |||
| */ | |||
| bool containsPoint (int x, int y) const noexcept; | |||
| bool containsPoint (ValueType x, ValueType y) const noexcept | |||
| { | |||
| return contains (Point<ValueType> (x, y)); | |||
| } | |||
| /** Checks whether the region contains the whole of a given rectangle. | |||
| @@ -180,7 +432,27 @@ public: | |||
| defined by this object | |||
| @see intersectsRectangle, containsPoint | |||
| */ | |||
| bool containsRectangle (const Rectangle<int>& rectangleToCheck) const; | |||
| bool containsRectangle (const RectangleType& rectangleToCheck) const | |||
| { | |||
| if (rects.size() > 1) | |||
| { | |||
| RectangleList r (rectangleToCheck); | |||
| for (int i = rects.size(); --i >= 0;) | |||
| { | |||
| r.subtract (rects.getReference (i)); | |||
| if (r.rects.size() == 0) | |||
| return true; | |||
| } | |||
| } | |||
| else if (rects.size() > 0) | |||
| { | |||
| return rects.getReference (0).contains (rectangleToCheck); | |||
| } | |||
| return false; | |||
| } | |||
| /** Checks whether the region contains any part of a given rectangle. | |||
| @@ -188,17 +460,59 @@ public: | |||
| defined by this object | |||
| @see containsRectangle | |||
| */ | |||
| bool intersectsRectangle (const Rectangle<int>& rectangleToCheck) const noexcept; | |||
| bool intersectsRectangle (const RectangleType& rectangleToCheck) const noexcept | |||
| { | |||
| for (const RectangleType* r = rects.begin(), * const e = rects.end(); r != e; ++r) | |||
| if (r->intersects (rectangleToCheck)) | |||
| return true; | |||
| return false; | |||
| } | |||
| /** Checks whether this region intersects any part of another one. | |||
| @see intersectsRectangle | |||
| */ | |||
| bool intersects (const RectangleList& other) const noexcept; | |||
| bool intersects (const RectangleList& other) const noexcept | |||
| { | |||
| for (const RectangleType* r = rects.begin(), * const e = rects.end(); r != e; ++r) | |||
| if (other.intersectsRectangle (*r)) | |||
| return true; | |||
| return false; | |||
| } | |||
| //============================================================================== | |||
| /** Returns the smallest rectangle that can enclose the whole of this region. */ | |||
| Rectangle<int> getBounds() const noexcept; | |||
| RectangleType getBounds() const noexcept | |||
| { | |||
| if (rects.size() <= 1) | |||
| { | |||
| if (rects.size() == 0) | |||
| return RectangleType(); | |||
| return rects.getReference (0); | |||
| } | |||
| const RectangleType& r = rects.getReference (0); | |||
| ValueType minX = r.pos.x; | |||
| ValueType minY = r.pos.y; | |||
| ValueType maxX = minX + r.w; | |||
| ValueType maxY = minY + r.h; | |||
| for (int i = rects.size(); --i > 0;) | |||
| { | |||
| const RectangleType& r2 = rects.getReference (i); | |||
| minX = jmin (minX, r2.pos.x); | |||
| minY = jmin (minY, r2.pos.y); | |||
| maxX = jmax (maxX, r2.getRight()); | |||
| maxY = jmax (maxY, r2.getBottom()); | |||
| } | |||
| return RectangleType (minX, minY, maxX - minX, maxY - minY); | |||
| } | |||
| /** Optimises the list into a minimum number of constituent rectangles. | |||
| @@ -206,63 +520,116 @@ public: | |||
| possible, to simplify lists that might have been fragmented by repeated | |||
| add/subtract calls. | |||
| */ | |||
| void consolidate(); | |||
| void consolidate() | |||
| { | |||
| for (int i = 0; i < getNumRectangles() - 1; ++i) | |||
| { | |||
| RectangleType& r = rects.getReference (i); | |||
| const ValueType rx1 = r.pos.x; | |||
| const ValueType ry1 = r.pos.y; | |||
| const ValueType rx2 = rx1 + r.w; | |||
| const ValueType ry2 = ry1 + r.h; | |||
| for (int j = rects.size(); --j > i;) | |||
| { | |||
| RectangleType& r2 = rects.getReference (j); | |||
| const ValueType jrx1 = r2.pos.x; | |||
| const ValueType jry1 = r2.pos.y; | |||
| const ValueType jrx2 = jrx1 + r2.w; | |||
| const ValueType jry2 = jry1 + r2.h; | |||
| // if the vertical edges of any blocks are touching and their horizontals don't | |||
| // line up, split them horizontally.. | |||
| if (jrx1 == rx2 || jrx2 == rx1) | |||
| { | |||
| if (jry1 > ry1 && jry1 < ry2) | |||
| { | |||
| r.h = jry1 - ry1; | |||
| rects.add (RectangleType (rx1, jry1, rx2 - rx1, ry2 - jry1)); | |||
| i = -1; | |||
| break; | |||
| } | |||
| if (jry2 > ry1 && jry2 < ry2) | |||
| { | |||
| r.h = jry2 - ry1; | |||
| rects.add (RectangleType (rx1, jry2, rx2 - rx1, ry2 - jry2)); | |||
| i = -1; | |||
| break; | |||
| } | |||
| else if (ry1 > jry1 && ry1 < jry2) | |||
| { | |||
| r2.h = ry1 - jry1; | |||
| rects.add (RectangleType (jrx1, ry1, jrx2 - jrx1, jry2 - ry1)); | |||
| i = -1; | |||
| break; | |||
| } | |||
| else if (ry2 > jry1 && ry2 < jry2) | |||
| { | |||
| r2.h = ry2 - jry1; | |||
| rects.add (RectangleType (jrx1, ry2, jrx2 - jrx1, jry2 - ry2)); | |||
| i = -1; | |||
| break; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| for (int i = 0; i < rects.size() - 1; ++i) | |||
| { | |||
| RectangleType& r = rects.getReference (i); | |||
| for (int j = rects.size(); --j > i;) | |||
| { | |||
| if (r.enlargeIfAdjacent (rects.getReference (j))) | |||
| { | |||
| rects.remove (j); | |||
| i = -1; | |||
| break; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| /** Adds an x and y value to all the coordinates. */ | |||
| void offsetAll (int dx, int dy) noexcept; | |||
| void offsetAll (ValueType dx, ValueType dy) noexcept | |||
| { | |||
| for (RectangleType* r = rects.begin(), * const e = rects.end(); r != e; ++r) | |||
| { | |||
| r->pos.x += dx; | |||
| r->pos.y += dy; | |||
| } | |||
| } | |||
| /** Scales all the coordinates. */ | |||
| template <typename ScaleType> | |||
| void scaleAll (ScaleType scaleFactor) noexcept | |||
| { | |||
| for (Rectangle<int>* r = rects.begin(), * const e = rects.end(); r != e; ++r) | |||
| for (RectangleType* r = rects.begin(), * const e = rects.end(); r != e; ++r) | |||
| *r *= scaleFactor; | |||
| } | |||
| //============================================================================== | |||
| /** Creates a Path object to represent this region. */ | |||
| Path toPath() const; | |||
| //============================================================================== | |||
| /** Standard method for iterating the rectangles in the list. */ | |||
| const Rectangle<int>* begin() const noexcept { return rects.begin(); } | |||
| /** Standard method for iterating the rectangles in the list. */ | |||
| const Rectangle<int>* end() const noexcept { return rects.end(); } | |||
| //============================================================================== | |||
| /** An iterator for accessing all the rectangles in a RectangleList. | |||
| Note that this class is deprectated in favour of just using the standard | |||
| RectangleList::begin() and RectangleList::end() methods, which are more efficient. | |||
| */ | |||
| class JUCE_API Iterator | |||
| Path toPath() const | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| Iterator (const RectangleList& list) noexcept; | |||
| ~Iterator(); | |||
| //============================================================================== | |||
| /** Advances to the next rectangle, and returns true if it's not finished. | |||
| Path p; | |||
| Call this before using getRectangle() to find the rectangle that was returned. | |||
| */ | |||
| bool next() noexcept; | |||
| for (int i = 0; i < rects.size(); ++i) | |||
| p.addRectangle (rects.getReference (i)); | |||
| /** Returns the current rectangle. */ | |||
| const Rectangle<int>* getRectangle() const noexcept { return current; } | |||
| private: | |||
| const Rectangle<int>* current; | |||
| const RectangleList& owner; | |||
| int index; | |||
| return p; | |||
| } | |||
| JUCE_DECLARE_NON_COPYABLE (Iterator) | |||
| }; | |||
| //============================================================================== | |||
| /** Standard method for iterating the rectangles in the list. */ | |||
| const RectangleType* begin() const noexcept { return rects.begin(); } | |||
| /** Standard method for iterating the rectangles in the list. */ | |||
| const RectangleType* end() const noexcept { return rects.end(); } | |||
| private: | |||
| //============================================================================== | |||
| friend class Iterator; | |||
| Array <Rectangle<int> > rects; | |||
| Array<RectangleType> rects; | |||
| JUCE_LEAK_DETECTOR (RectangleList) | |||
| }; | |||
| @@ -522,7 +522,7 @@ void Image::desaturate() | |||
| } | |||
| } | |||
| void Image::createSolidAreaMask (RectangleList& result, const float alphaThreshold) const | |||
| void Image::createSolidAreaMask (RectangleList<int>& result, const float alphaThreshold) const | |||
| { | |||
| if (hasAlphaChannel()) | |||
| { | |||
| @@ -383,7 +383,7 @@ public: | |||
| @param alphaThreshold for a semi-transparent image, any pixels whose alpha is | |||
| above this level will be considered opaque | |||
| */ | |||
| void createSolidAreaMask (RectangleList& result, float alphaThreshold) const; | |||
| void createSolidAreaMask (RectangleList<int>& result, float alphaThreshold) const; | |||
| //============================================================================== | |||
| /** Returns a NamedValueSet that is attached to the image and which can be used for | |||
| @@ -105,7 +105,6 @@ namespace juce | |||
| #include "geometry/juce_Path.cpp" | |||
| #include "geometry/juce_PathIterator.cpp" | |||
| #include "geometry/juce_PathStrokeType.cpp" | |||
| #include "geometry/juce_RectangleList.cpp" | |||
| #include "placement/juce_Justification.cpp" | |||
| #include "placement/juce_RectanglePlacement.cpp" | |||
| #include "contexts/juce_GraphicsContext.cpp" | |||
| @@ -1550,7 +1550,7 @@ namespace ClipRegions | |||
| virtual Ptr applyClipTo (const Ptr& target) const = 0; | |||
| virtual Ptr clipToRectangle (const Rectangle<int>&) = 0; | |||
| virtual Ptr clipToRectangleList (const RectangleList&) = 0; | |||
| virtual Ptr clipToRectangleList (const RectangleList<int>&) = 0; | |||
| virtual Ptr excludeClipRectangle (const Rectangle<int>&) = 0; | |||
| virtual Ptr clipToPath (const Path&, const AffineTransform&) = 0; | |||
| virtual Ptr clipToEdgeTable (const EdgeTable& et) = 0; | |||
| @@ -1572,12 +1572,12 @@ namespace ClipRegions | |||
| class EdgeTableRegion : public Base | |||
| { | |||
| public: | |||
| EdgeTableRegion (const EdgeTable& e) : edgeTable (e) {} | |||
| EdgeTableRegion (const Rectangle<int>& r) : edgeTable (r) {} | |||
| EdgeTableRegion (const Rectangle<float>& r) : edgeTable (r) {} | |||
| EdgeTableRegion (const RectangleList& r) : edgeTable (r) {} | |||
| EdgeTableRegion (const EdgeTable& e) : edgeTable (e) {} | |||
| EdgeTableRegion (const Rectangle<int>& r) : edgeTable (r) {} | |||
| EdgeTableRegion (const Rectangle<float>& r) : edgeTable (r) {} | |||
| EdgeTableRegion (const RectangleList<int>& r) : edgeTable (r) {} | |||
| EdgeTableRegion (const Rectangle<int>& bounds, const Path& p, const AffineTransform& t) : edgeTable (bounds, p, t) {} | |||
| EdgeTableRegion (const EdgeTableRegion& other) : Base(), edgeTable (other.edgeTable) {} | |||
| EdgeTableRegion (const EdgeTableRegion& other) : Base(), edgeTable (other.edgeTable) {} | |||
| Ptr clone() const { return new EdgeTableRegion (*this); } | |||
| Ptr applyClipTo (const Ptr& target) const { return target->clipToEdgeTable (edgeTable); } | |||
| @@ -1588,9 +1588,9 @@ namespace ClipRegions | |||
| return edgeTable.isEmpty() ? nullptr : this; | |||
| } | |||
| Ptr clipToRectangleList (const RectangleList& r) | |||
| Ptr clipToRectangleList (const RectangleList<int>& r) | |||
| { | |||
| RectangleList inverse (edgeTable.getMaximumBounds()); | |||
| RectangleList<int> inverse (edgeTable.getMaximumBounds()); | |||
| if (inverse.subtract (r)) | |||
| for (const Rectangle<int>* i = inverse.begin(), * const e = inverse.end(); i != e; ++i) | |||
| @@ -1772,7 +1772,7 @@ namespace ClipRegions | |||
| { | |||
| public: | |||
| RectangleListRegion (const Rectangle<int>& r) : clip (r) {} | |||
| RectangleListRegion (const RectangleList& r) : clip (r) {} | |||
| RectangleListRegion (const RectangleList<int>& r) : clip (r) {} | |||
| RectangleListRegion (const RectangleListRegion& other) : Base(), clip (other.clip) {} | |||
| Ptr clone() const { return new RectangleListRegion (*this); } | |||
| @@ -1784,7 +1784,7 @@ namespace ClipRegions | |||
| return clip.isEmpty() ? nullptr : this; | |||
| } | |||
| Ptr clipToRectangleList (const RectangleList& r) | |||
| Ptr clipToRectangleList (const RectangleList<int>& r) | |||
| { | |||
| clip.clipTo (r); | |||
| return clip.isEmpty() ? nullptr : this; | |||
| @@ -1870,7 +1870,7 @@ namespace ClipRegions | |||
| EdgeTableFillers::renderImageUntransformed (*this, destData, srcData, alpha, x, y, tiledFill); | |||
| } | |||
| RectangleList clip; | |||
| RectangleList<int> clip; | |||
| //============================================================================== | |||
| template <class Renderer> | |||
| @@ -1896,7 +1896,7 @@ namespace ClipRegions | |||
| class SubRectangleIterator | |||
| { | |||
| public: | |||
| SubRectangleIterator (const RectangleList& clipList, const Rectangle<int>& clipBounds) | |||
| SubRectangleIterator (const RectangleList<int>& clipList, const Rectangle<int>& clipBounds) | |||
| : clip (clipList), area (clipBounds) | |||
| {} | |||
| @@ -1923,7 +1923,7 @@ namespace ClipRegions | |||
| } | |||
| private: | |||
| const RectangleList& clip; | |||
| const RectangleList<int>& clip; | |||
| const Rectangle<int> area; | |||
| JUCE_DECLARE_NON_COPYABLE (SubRectangleIterator) | |||
| @@ -1933,7 +1933,7 @@ namespace ClipRegions | |||
| class SubRectangleIteratorFloat | |||
| { | |||
| public: | |||
| SubRectangleIteratorFloat (const RectangleList& clipList, const Rectangle<float>& clipBounds) noexcept | |||
| SubRectangleIteratorFloat (const RectangleList<int>& clipList, const Rectangle<float>& clipBounds) noexcept | |||
| : clip (clipList), area (clipBounds) | |||
| { | |||
| } | |||
| @@ -2013,7 +2013,7 @@ namespace ClipRegions | |||
| } | |||
| private: | |||
| const RectangleList& clip; | |||
| const RectangleList<int>& clip; | |||
| const Rectangle<float>& area; | |||
| JUCE_DECLARE_NON_COPYABLE (SubRectangleIteratorFloat) | |||
| @@ -2037,7 +2037,7 @@ public: | |||
| { | |||
| } | |||
| SoftwareRendererSavedState (const Image& im, const RectangleList& clipList, const int x, const int y) | |||
| SoftwareRendererSavedState (const Image& im, const RectangleList<int>& clipList, const int x, const int y) | |||
| : image (im), clip (new ClipRegions::RectangleListRegion (clipList)), | |||
| transform (x, y), | |||
| interpolationQuality (Graphics::mediumResamplingQuality), | |||
| @@ -2078,21 +2078,21 @@ public: | |||
| return clip != nullptr; | |||
| } | |||
| bool clipToRectangleList (const RectangleList& r) | |||
| bool clipToRectangleList (const RectangleList<int>& r) | |||
| { | |||
| if (clip != nullptr) | |||
| { | |||
| if (transform.isOnlyTranslated) | |||
| { | |||
| cloneClipIfMultiplyReferenced(); | |||
| RectangleList offsetList (r); | |||
| RectangleList<int> offsetList (r); | |||
| offsetList.offsetAll (transform.xOffset, transform.yOffset); | |||
| clip = clip->clipToRectangleList (offsetList); | |||
| } | |||
| else if (transform.isIntegerScaling) | |||
| { | |||
| cloneClipIfMultiplyReferenced(); | |||
| RectangleList scaledList; | |||
| RectangleList<int> scaledList; | |||
| for (const Rectangle<int>* i = r.begin(), * const e = r.end(); i != e; ++i) | |||
| scaledList.add (transform.transformed (*i)); | |||
| @@ -40,7 +40,7 @@ public: | |||
| float getScaleFactor() override; | |||
| float getTargetDeviceScaleFactor() override { return targetScale; } | |||
| bool clipToRectangle (const Rectangle<int>&) override; | |||
| bool clipToRectangleList (const RectangleList&) override; | |||
| bool clipToRectangleList (const RectangleList<int>&) override; | |||
| void excludeClipRectangle (const Rectangle<int>&) override; | |||
| void clipToPath (const Path&, const AffineTransform&) override; | |||
| void clipToImageAlpha (const Image&, const AffineTransform&) override; | |||
| @@ -113,7 +113,7 @@ private: | |||
| void flip() const; | |||
| void applyTransform (const AffineTransform&) const; | |||
| void drawImage (const Image&, const AffineTransform&, bool fillEntireClipAsTiles); | |||
| bool clipToRectangleListWithoutTest (const RectangleList&); | |||
| bool clipToRectangleListWithoutTest (const RectangleList<int>&); | |||
| void fillCGRect (const CGRect&, bool replaceExistingContents); | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CoreGraphicsContext) | |||
| @@ -192,7 +192,7 @@ bool CoreGraphicsContext::clipToRectangle (const Rectangle<int>& r) | |||
| return ! isClipEmpty(); | |||
| } | |||
| bool CoreGraphicsContext::clipToRectangleListWithoutTest (const RectangleList& clipRegion) | |||
| bool CoreGraphicsContext::clipToRectangleListWithoutTest (const RectangleList<int>& clipRegion) | |||
| { | |||
| if (clipRegion.isEmpty()) | |||
| { | |||
| @@ -216,14 +216,14 @@ bool CoreGraphicsContext::clipToRectangleListWithoutTest (const RectangleList& c | |||
| } | |||
| } | |||
| bool CoreGraphicsContext::clipToRectangleList (const RectangleList& clipRegion) | |||
| bool CoreGraphicsContext::clipToRectangleList (const RectangleList<int>& clipRegion) | |||
| { | |||
| return clipToRectangleListWithoutTest (clipRegion) && ! isClipEmpty(); | |||
| } | |||
| void CoreGraphicsContext::excludeClipRectangle (const Rectangle<int>& r) | |||
| { | |||
| RectangleList remaining (getClipBounds()); | |||
| RectangleList<int> remaining (getClipBounds()); | |||
| remaining.subtract (r); | |||
| clipToRectangleListWithoutTest (remaining); | |||
| } | |||
| @@ -103,7 +103,7 @@ public: | |||
| return ! isClipEmpty(); | |||
| } | |||
| bool clipToRectangleList (const RectangleList& clipRegion) | |||
| bool clipToRectangleList (const RectangleList<int>& clipRegion) | |||
| { | |||
| currentState->clipToRectList (rectListToPathGeometry (clipRegion)); | |||
| return ! isClipEmpty(); | |||
| @@ -742,7 +742,7 @@ private: | |||
| sink->EndFigure (D2D1_FIGURE_END_CLOSED); | |||
| } | |||
| static ID2D1PathGeometry* rectListToPathGeometry (const RectangleList& clipRegion) | |||
| static ID2D1PathGeometry* rectListToPathGeometry (const RectangleList<int>& clipRegion) | |||
| { | |||
| ID2D1PathGeometry* p = nullptr; | |||
| Direct2DFactories::getInstance().d2dFactory->CreatePathGeometry (&p); | |||
| @@ -335,7 +335,7 @@ struct Component::ComponentHelpers | |||
| return nothingChanged; | |||
| } | |||
| static void subtractObscuredRegions (const Component& comp, RectangleList& result, | |||
| static void subtractObscuredRegions (const Component& comp, RectangleList<int>& result, | |||
| Point<int> delta, const Rectangle<int>& clipRect, | |||
| const Component* const compToAvoid) | |||
| { | |||
| @@ -743,7 +743,7 @@ public: | |||
| private: | |||
| Image image; | |||
| RectangleList validArea; | |||
| RectangleList<int> validArea; | |||
| Component& owner; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (StandardCachedComponentImage) | |||
| @@ -2114,7 +2114,7 @@ Rectangle<int> Component::getBoundsInParent() const noexcept | |||
| : bounds.transformedBy (*affineTransform); | |||
| } | |||
| void Component::getVisibleArea (RectangleList& result, const bool includeSiblings) const | |||
| void Component::getVisibleArea (RectangleList<int>& result, const bool includeSiblings) const | |||
| { | |||
| result.clear(); | |||
| const Rectangle<int> unclipped (ComponentHelpers::getUnclippedArea (*this)); | |||
| @@ -330,7 +330,7 @@ public: | |||
| If includeSiblings is true, it will also take into account any siblings | |||
| that may be overlapping the component. | |||
| */ | |||
| void getVisibleArea (RectangleList& result, bool includeSiblings) const; | |||
| void getVisibleArea (RectangleList<int>& result, bool includeSiblings) const; | |||
| //============================================================================== | |||
| /** Returns this component's x coordinate relative the the screen's top-left origin. | |||
| @@ -378,9 +378,9 @@ const Desktop::Displays::Display& Desktop::Displays::getDisplayContaining (Point | |||
| return *best; | |||
| } | |||
| RectangleList Desktop::Displays::getRectangleList (bool userAreasOnly) const | |||
| RectangleList<int> Desktop::Displays::getRectangleList (bool userAreasOnly) const | |||
| { | |||
| RectangleList rl; | |||
| RectangleList<int> rl; | |||
| for (int i = 0; i < displays.size(); ++i) | |||
| { | |||
| @@ -352,7 +352,7 @@ public: | |||
| const Display& getDisplayContaining (Point<int> position) const noexcept; | |||
| /** Returns a RectangleList made up of all the displays. */ | |||
| RectangleList getRectangleList (bool userAreasOnly) const; | |||
| RectangleList<int> getRectangleList (bool userAreasOnly) const; | |||
| /** Returns the smallest bounding box which contains all the displays. */ | |||
| Rectangle<int> getTotalBounds (bool userAreasOnly) const; | |||
| @@ -244,7 +244,7 @@ void TabbedComponent::paint (Graphics& g) | |||
| if (outlineThickness > 0) | |||
| { | |||
| RectangleList rl (content); | |||
| RectangleList<int> rl (content); | |||
| rl.subtract (outline.subtractedFrom (content)); | |||
| g.reduceClipRegion (rl); | |||
| @@ -300,7 +300,8 @@ MouseCursor LookAndFeel::getMouseCursorFor (Component& component) | |||
| return m; | |||
| } | |||
| LowLevelGraphicsContext* LookAndFeel::createGraphicsContext (const Image& imageToRenderOn, const Point<int>& origin, const RectangleList& initialClip) | |||
| LowLevelGraphicsContext* LookAndFeel::createGraphicsContext (const Image& imageToRenderOn, const Point<int>& origin, | |||
| const RectangleList<int>& initialClip) | |||
| { | |||
| return new LowLevelGraphicsSoftwareRenderer (imageToRenderOn, origin, initialClip); | |||
| } | |||
| @@ -148,7 +148,7 @@ public: | |||
| // Creates a new graphics context object. | |||
| virtual LowLevelGraphicsContext* createGraphicsContext (const Image& imageToRenderOn, | |||
| const Point<int>& origin, | |||
| const RectangleList& initialClip); | |||
| const RectangleList<int>& initialClip); | |||
| //============================================================================== | |||
| /** Draws the lozenge-shaped background for a standard button. */ | |||
| @@ -1842,7 +1842,7 @@ private: | |||
| peer.clearMaskedRegion(); | |||
| RectangleList originalRepaintRegion (regionsNeedingRepaint); | |||
| RectangleList<int> originalRepaintRegion (regionsNeedingRepaint); | |||
| regionsNeedingRepaint.clear(); | |||
| const Rectangle<int> totalArea (originalRepaintRegion.getBounds()); | |||
| @@ -1864,7 +1864,7 @@ private: | |||
| startTimer (repaintTimerPeriod); | |||
| RectangleList adjustedList (originalRepaintRegion); | |||
| RectangleList<int> adjustedList (originalRepaintRegion); | |||
| adjustedList.offsetAll (-totalArea.getX(), -totalArea.getY()); | |||
| if (peer.depth == 32) | |||
| @@ -1907,7 +1907,7 @@ private: | |||
| LinuxComponentPeer& peer; | |||
| Image image; | |||
| uint32 lastTimeImageUsed; | |||
| RectangleList regionsNeedingRepaint; | |||
| RectangleList<int> regionsNeedingRepaint; | |||
| #if JUCE_USE_XSHM | |||
| bool useARGBImagesForRendering; | |||
| @@ -64,7 +64,7 @@ public: | |||
| appFocusChangeCallback = appFocusChanged; | |||
| isEventBlockedByModalComps = checkEventBlockedByModalComps; | |||
| NSRect r = NSMakeRect (0, 0, (CGFloat) component.getWidth(), (CGFloat) component.getHeight()); | |||
| NSRect r = makeNSRect (component.getLocalBounds()); | |||
| view = [createViewInstance() initWithFrame: r]; | |||
| setOwner (view, this); | |||
| @@ -225,8 +225,7 @@ public: | |||
| { | |||
| fullScreen = isNowFullScreen; | |||
| NSRect r = NSMakeRect ((CGFloat) newBounds.getX(), (CGFloat) newBounds.getY(), | |||
| (CGFloat) jmax (0, newBounds.getWidth()), (CGFloat) jmax (0, newBounds.getHeight())); | |||
| NSRect r = makeNSRect (newBounds); | |||
| if (isSharedWindow) | |||
| { | |||
| @@ -770,7 +769,7 @@ public: | |||
| const int clipW = (int) (r.size.width + 0.5f); | |||
| const int clipH = (int) (r.size.height + 0.5f); | |||
| RectangleList clip; | |||
| RectangleList<int> clip; | |||
| getClipRects (clip, offset, clipW, clipH); | |||
| if (! clip.isEmpty()) | |||
| @@ -1192,7 +1191,7 @@ private: | |||
| object_setInstanceVariable (viewOrWindow, "owner", newOwner); | |||
| } | |||
| void getClipRects (RectangleList& clip, const Point<int> offset, const int clipW, const int clipH) | |||
| void getClipRects (RectangleList<int>& clip, const Point<int> offset, const int clipW, const int clipH) | |||
| { | |||
| const NSRect* rects = nullptr; | |||
| NSInteger numRects = 0; | |||
| @@ -333,7 +333,7 @@ public: | |||
| void blitToWindow (HWND hwnd, HDC dc, const bool transparent, | |||
| const int x, const int y, | |||
| const RectangleList& maskedRegion, | |||
| const RectangleList<int>& maskedRegion, | |||
| const uint8 updateLayeredWindowAlpha) noexcept | |||
| { | |||
| SetMapMode (dc, MM_TEXT); | |||
| @@ -1487,7 +1487,7 @@ private: | |||
| Image& offscreenImage = offscreenImageGenerator.getImage (transparent, w, h); | |||
| RectangleList contextClip; | |||
| RectangleList<int> contextClip; | |||
| const Rectangle<int> clipBounds (w, h); | |||
| bool needToPaintAll = true; | |||
| @@ -399,6 +399,14 @@ Rectangle<int> ComponentPeer::globalToLocal (const Rectangle<int>& screenPositio | |||
| return screenPosition.withPosition (globalToLocal (screenPosition.getPosition())); | |||
| } | |||
| Rectangle<int> ComponentPeer::getAreaCoveredBy (Component& subComponent) const | |||
| { | |||
| jassert (component.isParentOf (&subComponent)); // this can only be used for child components. | |||
| return Component::ComponentHelpers::scaledScreenPosToUnscaled | |||
| (component.getLocalArea (&subComponent, subComponent.getLocalBounds())); | |||
| } | |||
| //============================================================================== | |||
| namespace DragHelpers | |||
| { | |||
| @@ -165,6 +165,11 @@ public: | |||
| /** Converts a screen area to a position relative to the top-left of this component. */ | |||
| virtual Rectangle<int> globalToLocal (const Rectangle<int>& screenPosition); | |||
| /** Returns the area in peer coordinates that is covered by the given sub-comp (which | |||
| may be at any depth) | |||
| */ | |||
| Rectangle<int> getAreaCoveredBy (Component& subComponent) const; | |||
| /** Minimises the window. */ | |||
| virtual void setMinimised (bool shouldBeMinimised) = 0; | |||
| @@ -364,7 +369,7 @@ protected: | |||
| //============================================================================== | |||
| Component& component; | |||
| const int styleFlags; | |||
| RectangleList maskedRegion; | |||
| RectangleList<int> maskedRegion; | |||
| Rectangle<int> lastNonFullscreenBounds; | |||
| ComponentBoundsConstrainer* constrainer; | |||
| @@ -532,7 +532,7 @@ bool ResizableWindow::restoreWindowStateFromString (const String& s) | |||
| { | |||
| Desktop& desktop = Desktop::getInstance(); | |||
| RectangleList allMonitors (desktop.getDisplays().getRectangleList (true)); | |||
| RectangleList<int> allMonitors (desktop.getDisplays().getRectangleList (true)); | |||
| allMonitors.clipTo (newPos); | |||
| const Rectangle<int> onScreenArea (allMonitors.getBounds()); | |||
| @@ -58,13 +58,9 @@ public: | |||
| void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) override | |||
| { | |||
| Component* const topComp = owner.getTopLevelComponent(); | |||
| if (topComp->getPeer() != nullptr) | |||
| if (ComponentPeer* const peer = owner.getTopLevelComponent()->getPeer()) | |||
| { | |||
| const Rectangle<int> area (topComp->getLocalArea (&owner, owner.getLocalBounds())); | |||
| NSRect r = NSMakeRect ((float) area.getX(), (float) area.getY(), (float) area.getWidth(), (float) area.getHeight()); | |||
| NSRect r = makeNSRect (peer->getAreaCoveredBy (owner)); | |||
| r.origin.y = [[view superview] frame].size.height - (r.origin.y + r.size.height); | |||
| [view setFrame: r]; | |||
| } | |||
| @@ -142,7 +142,10 @@ private: | |||
| { | |||
| Component* topComp = component.getTopLevelComponent(); | |||
| nativeWindow = createNonRepaintingEmbeddedWindowsPeer (&dummyComponent, topComp->getWindowHandle()); | |||
| updateWindowPosition (topComp->getLocalArea (&component, component.getLocalBounds())); | |||
| if (ComponentPeer* peer = topComp->getPeer()) | |||
| updateWindowPosition (peer->getAreaCoveredBy (component)); | |||
| nativeWindow->setVisible (true); | |||
| dc = GetDC ((HWND) nativeWindow->getNativeHandle()); | |||
| } | |||
| @@ -119,7 +119,7 @@ public: | |||
| return true; | |||
| } | |||
| void clearRegionInFrameBuffer (const RectangleList& list, const float scaleFactor) | |||
| void clearRegionInFrameBuffer (const RectangleList<int>& list, const float scaleFactor) | |||
| { | |||
| glClearColor (0, 0, 0, 0); | |||
| glEnable (GL_SCISSOR_TEST); | |||
| @@ -211,7 +211,7 @@ public: | |||
| if (! ensureFrameBufferSize()) | |||
| return; | |||
| RectangleList invalid (viewportArea); | |||
| RectangleList<int> invalid (viewportArea); | |||
| invalid.subtract (validArea); | |||
| validArea = viewportArea; | |||
| @@ -361,7 +361,7 @@ public: | |||
| Component& component; | |||
| OpenGLFrameBuffer cachedImageFrameBuffer; | |||
| RectangleList validArea; | |||
| RectangleList<int> validArea; | |||
| Rectangle<int> viewportArea; | |||
| double scale; | |||
| @@ -429,8 +429,8 @@ public: | |||
| if (CachedImage* const c = CachedImage::get (comp)) | |||
| c->handleResize(); | |||
| context.nativeContext->updateWindowPosition (comp.getTopLevelComponent() | |||
| ->getLocalArea (&comp, comp.getLocalBounds())); | |||
| if (ComponentPeer* peer = comp.getTopLevelComponent()->getPeer()) | |||
| context.nativeContext->updateWindowPosition (peer->getAreaCoveredBy (comp)); | |||
| } | |||
| } | |||
| @@ -978,13 +978,13 @@ struct StateHelpers | |||
| RenderingHelpers::FloatRectangleRasterisingInfo (r).iterate (frr); | |||
| } | |||
| void add (const RectangleList& list, const PixelARGB colour) noexcept | |||
| void add (const RectangleList<int>& list, const PixelARGB colour) noexcept | |||
| { | |||
| for (const Rectangle<int>* i = list.begin(), * const e = list.end(); i != e; ++i) | |||
| add (*i, colour); | |||
| } | |||
| void add (const RectangleList& list, const Rectangle<int>& clip, const PixelARGB colour) noexcept | |||
| void add (const RectangleList<int>& list, const Rectangle<int>& clip, const PixelARGB colour) noexcept | |||
| { | |||
| for (const Rectangle<int>* i = list.begin(), * const e = list.end(); i != e; ++i) | |||
| { | |||
| @@ -1318,7 +1318,7 @@ public: | |||
| virtual Ptr clone() const = 0; | |||
| virtual Ptr clipToRectangle (const Rectangle<int>&) = 0; | |||
| virtual Ptr clipToRectangleList (const RectangleList&) = 0; | |||
| virtual Ptr clipToRectangleList (const RectangleList<int>&) = 0; | |||
| virtual Ptr excludeClipRectangle (const Rectangle<int>&) = 0; | |||
| virtual Ptr clipToPath (const Path& p, const AffineTransform&) = 0; | |||
| virtual Ptr clipToImageAlpha (const OpenGLTextureFromImage&, const AffineTransform&) = 0; | |||
| @@ -1369,7 +1369,7 @@ public: | |||
| state.shaderQuadQueue.flush(); | |||
| } | |||
| ClipRegion_Mask (GLState& state_, const RectangleList& r) | |||
| ClipRegion_Mask (GLState& state_, const RectangleList<int>& r) | |||
| : ClipRegionBase (state_), | |||
| clip (r.getBounds()), | |||
| maskArea (clip) | |||
| @@ -1397,13 +1397,13 @@ public: | |||
| return clip.isEmpty() ? nullptr : this; | |||
| } | |||
| Ptr clipToRectangleList (const RectangleList& r) | |||
| Ptr clipToRectangleList (const RectangleList<int>& r) | |||
| { | |||
| clip = clip.getIntersection (r.getBounds()); | |||
| if (clip.isEmpty()) | |||
| return Ptr(); | |||
| RectangleList excluded (clip); | |||
| RectangleList<int> excluded (clip); | |||
| if (excluded.subtract (r)) | |||
| { | |||
| @@ -1640,7 +1640,7 @@ public: | |||
| : ClipRegionBase (state_), clip (r) | |||
| {} | |||
| ClipRegion_RectangleList (GLState& state_, const RectangleList& r) noexcept | |||
| ClipRegion_RectangleList (GLState& state_, const RectangleList<int>& r) noexcept | |||
| : ClipRegionBase (state_), clip (r) | |||
| {} | |||
| @@ -1704,13 +1704,13 @@ public: | |||
| } | |||
| } | |||
| Rectangle<int> getClipBounds() const { return clip.getBounds(); } | |||
| Ptr clipToRectangle (const Rectangle<int>& r) { return clip.clipTo (r) ? this : nullptr; } | |||
| Ptr clipToRectangleList (const RectangleList& r) { return clip.clipTo (r) ? this : nullptr; } | |||
| Ptr excludeClipRectangle (const Rectangle<int>& r) { clip.subtract (r); return clip.isEmpty() ? nullptr : this; } | |||
| Rectangle<int> getClipBounds() const { return clip.getBounds(); } | |||
| Ptr clipToRectangle (const Rectangle<int>& r) { return clip.clipTo (r) ? this : nullptr; } | |||
| Ptr clipToRectangleList (const RectangleList<int>& r) { return clip.clipTo (r) ? this : nullptr; } | |||
| Ptr excludeClipRectangle (const Rectangle<int>& r) { clip.subtract (r); return clip.isEmpty() ? nullptr : this; } | |||
| private: | |||
| RectangleList clip; | |||
| RectangleList<int> clip; | |||
| Ptr toMask() const { return new ClipRegion_Mask (state, clip); } | |||
| @@ -1796,21 +1796,21 @@ public: | |||
| return clip != nullptr; | |||
| } | |||
| bool clipToRectangleList (const RectangleList& r) | |||
| bool clipToRectangleList (const RectangleList<int>& r) | |||
| { | |||
| if (clip != nullptr) | |||
| { | |||
| if (transform.isOnlyTranslated) | |||
| { | |||
| cloneClipIfMultiplyReferenced(); | |||
| RectangleList offsetList (r); | |||
| RectangleList<int> offsetList (r); | |||
| offsetList.offsetAll (transform.xOffset, transform.yOffset); | |||
| clip = clip->clipToRectangleList (offsetList); | |||
| } | |||
| else if (transform.isIntegerScaling) | |||
| { | |||
| cloneClipIfMultiplyReferenced(); | |||
| RectangleList scaledList; | |||
| RectangleList<int> scaledList; | |||
| for (const Rectangle<int>* i = r.begin(), * const e = r.end(); i != e; ++i) | |||
| scaledList.add (transform.transformed (*i).getSmallestIntegerContainer()); | |||
| @@ -2124,7 +2124,7 @@ public: | |||
| bool isClipEmpty() const { return stack->clip == nullptr; } | |||
| bool clipRegionIntersects (const Rectangle<int>& r) { return stack->clipRegionIntersects (r); } | |||
| bool clipToRectangle (const Rectangle<int>& r) { return stack->clipToRectangle (r); } | |||
| bool clipToRectangleList (const RectangleList& r) { return stack->clipToRectangleList (r); } | |||
| bool clipToRectangleList (const RectangleList<int>& r) { return stack->clipToRectangleList (r); } | |||
| void excludeClipRectangle (const Rectangle<int>& r) { stack->excludeClipRectangle (r); } | |||
| void clipToPath (const Path& path, const AffineTransform& t) { stack->clipToPath (path, t); } | |||
| void clipToImageAlpha (const Image& im, const AffineTransform& t) { stack->clipToImageAlpha (im, t); } | |||