1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-17 00:44:19 +00:00

Added DrawableText::replaceColour()

This commit is contained in:
ed 2019-06-24 09:22:42 +01:00
parent fd4125d964
commit 9b48d6d516
2 changed files with 11 additions and 0 deletions

View file

@ -200,4 +200,13 @@ Path DrawableText::getOutlineAsPath() const
return pathOfAllGlyphs;
}
bool DrawableText::replaceColour (Colour originalColour, Colour replacementColour)
{
if (colour != originalColour)
return false;
setColour (replacementColour);
return true;
}
} // namespace juce

View file

@ -97,6 +97,8 @@ public:
Rectangle<float> getDrawableBounds() const override;
/** @internal */
Path getOutlineAsPath() const override;
/** @internal */
bool replaceColour (Colour originalColour, Colour replacementColour) override;
private:
//==============================================================================