50 void setText (
const String& newText);
56 void setColour (
Colour newColour);
67 void setFont (
const Font& newFont,
bool applySizeAndScale);
84 float getFontHeight() const noexcept {
return fontHeight; }
85 void setFontHeight (
float newHeight);
87 float getFontHorizontalScale() const noexcept {
return fontHScale; }
88 void setFontHorizontalScale (
float newScale);
92 void paint (Graphics&)
override;
96 Rectangle<float> getDrawableBounds()
const override;
98 Path getOutlineAsPath()
const override;
100 bool replaceColour (Colour originalColour, Colour replacementColour)
override;
106 Parallelogram<float> bounds;
107 float fontHeight, fontHScale;
108 Font font, scaledFont;
111 Justification justification;
113 void refreshBounds();
114 Rectangle<int> getTextArea (
float width,
float height)
const;
115 AffineTransform getTextTransform (
float width,
float height)
const;
117 DrawableText& operator= (
const DrawableText&);
A drawable object which renders a line of text.
const String & getText() const noexcept
Returns the currently displayed text.
const Font & getFont() const noexcept
Returns the current font.
Colour getColour() const noexcept
Returns the current text colour.
Parallelogram< float > getBoundingBox() const noexcept
Returns the parallelogram that defines the text bounding box.
Justification getJustification() const noexcept
Returns the current justification.