From 47ce713d0b8fc3d283573cd5b8069fed3ec178d4 Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Mon, 27 Nov 2017 13:41:45 +0000 Subject: [PATCH] Added Component::isPaintingUnclipped --- modules/juce_gui_basics/components/juce_Component.cpp | 5 +++++ modules/juce_gui_basics/components/juce_Component.h | 5 +++++ 2 files changed, 10 insertions(+) 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.