A glyph from a particular font, with a particular size, style, typeface and position. More...
Public Member Functions | |
| PositionedGlyph (const Font &font, juce_wchar character, int glyphNumber, float anchorX, float baselineY, float width, bool isWhitespace) | |
| PositionedGlyph (const PositionedGlyph &other) | |
| PositionedGlyph & | operator= (const PositionedGlyph &other) |
| ~PositionedGlyph () | |
| juce_wchar | getCharacter () const noexcept |
| Returns the character the glyph represents. | |
| bool | isWhitespace () const noexcept |
| Checks whether the glyph is actually empty. | |
| float | getLeft () const noexcept |
| Returns the position of the glyph's left-hand edge. | |
| float | getRight () const noexcept |
| Returns the position of the glyph's right-hand edge. | |
| float | getBaselineY () const noexcept |
| Returns the y position of the glyph's baseline. | |
| float | getTop () const |
| Returns the y position of the top of the glyph. | |
| float | getBottom () const |
| Returns the y position of the bottom of the glyph. | |
| const Rectangle< float > | getBounds () const |
| Returns the bounds of the glyph. | |
| void | moveBy (float deltaX, float deltaY) |
| Shifts the glyph's position by a relative amount. | |
| void | draw (const Graphics &g) const |
| Draws the glyph into a graphics context. | |
| void | draw (const Graphics &g, const AffineTransform &transform) const |
| Draws the glyph into a graphics context, with an extra transform applied to it. | |
| void | createPath (Path &path) const |
| Returns the path for this glyph. | |
| bool | hitTest (float x, float y) const |
| Checks to see if a point lies within this glyph. | |
A glyph from a particular font, with a particular size, style, typeface and position.
You should rarely need to use this class directly - for most purposes, the GlyphArrangement class will do what you need for text layout.
| PositionedGlyph::PositionedGlyph | ( | const Font & | font, |
| juce_wchar | character, | ||
| int | glyphNumber, | ||
| float | anchorX, | ||
| float | baselineY, | ||
| float | width, | ||
| bool | isWhitespace | ||
| ) |
| PositionedGlyph::PositionedGlyph | ( | const PositionedGlyph & | other ) |
| PositionedGlyph::~PositionedGlyph | ( | ) |
| PositionedGlyph& PositionedGlyph::operator= | ( | const PositionedGlyph & | other ) |
| juce_wchar PositionedGlyph::getCharacter | ( | ) | const |
Returns the character the glyph represents.
| bool PositionedGlyph::isWhitespace | ( | ) | const |
Checks whether the glyph is actually empty.
| float PositionedGlyph::getLeft | ( | ) | const |
Returns the position of the glyph's left-hand edge.
| float PositionedGlyph::getRight | ( | ) | const |
Returns the position of the glyph's right-hand edge.
| float PositionedGlyph::getBaselineY | ( | ) | const |
Returns the y position of the glyph's baseline.
| float PositionedGlyph::getTop | ( | ) | const |
Returns the y position of the top of the glyph.
References Font::getAscent().
| float PositionedGlyph::getBottom | ( | ) | const |
Returns the y position of the bottom of the glyph.
References Font::getDescent().
| const Rectangle<float> PositionedGlyph::getBounds | ( | ) | const |
Returns the bounds of the glyph.
References Font::getHeight().
| void PositionedGlyph::moveBy | ( | float | deltaX, |
| float | deltaY | ||
| ) |
Shifts the glyph's position by a relative amount.
| void PositionedGlyph::draw | ( | const Graphics & | g ) | const |
Draws the glyph into a graphics context.
| void PositionedGlyph::draw | ( | const Graphics & | g, |
| const AffineTransform & | transform | ||
| ) | const |
Draws the glyph into a graphics context, with an extra transform applied to it.
| void PositionedGlyph::createPath | ( | Path & | path ) | const |
Returns the path for this glyph.
| path | the glyph's outline will be appended to this path |
| bool PositionedGlyph::hitTest | ( | float | x, |
| float | y | ||
| ) | const |
Checks to see if a point lies within this glyph.