From 213d3fb56a99782868136fbab68ea73cac2d88c2 Mon Sep 17 00:00:00 2001 From: attila Date: Wed, 29 Jan 2025 11:17:43 +0100 Subject: [PATCH] Add RangedValues::getIntersectionsStartingAtZeroWith --- modules/juce_graphics/detail/juce_Ranges.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/juce_graphics/detail/juce_Ranges.h b/modules/juce_graphics/detail/juce_Ranges.h index ab8c8e7279..48ae6afa08 100644 --- a/modules/juce_graphics/detail/juce_Ranges.h +++ b/modules/juce_graphics/detail/juce_Ranges.h @@ -800,6 +800,13 @@ public: return result; } + RangedValues getIntersectionsStartingAtZeroWith (Range r) const + { + auto result = getIntersectionsWith (r); + result.drop ({ (int64) 0, r.getStart() }); + return result; + } + const auto& getRanges() const { return ranges; } size_t size() const