diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp index 35996b90ab..f8a2cb6487 100644 --- a/modules/juce_gui_basics/components/juce_Component.cpp +++ b/modules/juce_gui_basics/components/juce_Component.cpp @@ -2082,6 +2082,11 @@ void Component::setPaintingIsUnclipped (const bool shouldPaintWithoutClipping) n flags.dontClipGraphicsFlag = shouldPaintWithoutClipping; } +bool Component::isPaintingUnclipped() const noexcept +{ + return flags.dontClipGraphicsFlag; +} + //============================================================================== Image Component::createComponentSnapshot (Rectangle areaToGrab, bool clipImageToComponentBounds, float scaleFactor) diff --git a/modules/juce_gui_basics/components/juce_Component.h b/modules/juce_gui_basics/components/juce_Component.h index 39b63a49f9..f38299acec 100644 --- a/modules/juce_gui_basics/components/juce_Component.h +++ b/modules/juce_gui_basics/components/juce_Component.h @@ -1036,6 +1036,11 @@ public: */ void setPaintingIsUnclipped (bool shouldPaintWithoutClipping) noexcept; + /** Returns true if this component doesn't require its graphics context to be clipped + when it is being painted. + */ + bool isPaintingUnclipped() const noexcept; + //============================================================================== /** Adds an effect filter to alter the component's appearance.