A glyph from a particular font, with a particular size, style, typeface and position.
More...
|
| PositionedGlyph () noexcept |
|
| PositionedGlyph (const Font &font, juce_wchar character, int glyphNumber, float anchorX, float baselineY, float width, bool isWhitespace) |
|
| PositionedGlyph (const PositionedGlyph &)=default |
|
PositionedGlyph & | operator= (const PositionedGlyph &)=default |
|
| PositionedGlyph (PositionedGlyph &&) noexcept=default |
|
PositionedGlyph & | operator= (PositionedGlyph &&) noexcept=default |
|
| ~PositionedGlyph () |
|
juce_wchar | getCharacter () const noexcept |
| Returns the character the glyph represents. More...
|
|
bool | isWhitespace () const noexcept |
| Checks whether the glyph is actually empty. More...
|
|
float | getLeft () const noexcept |
| Returns the position of the glyph's left-hand edge. More...
|
|
float | getRight () const noexcept |
| Returns the position of the glyph's right-hand edge. More...
|
|
float | getBaselineY () const noexcept |
| Returns the y position of the glyph's baseline. More...
|
|
float | getTop () const |
| Returns the y position of the top of the glyph. More...
|
|
float | getBottom () const |
| Returns the y position of the bottom of the glyph. More...
|
|
Rectangle< float > | getBounds () const |
| Returns the bounds of the glyph. More...
|
|
void | moveBy (float deltaX, float deltaY) |
| Shifts the glyph's position by a relative amount. More...
|
|
void | draw (Graphics &g) const |
| Draws the glyph into a graphics context. More...
|
|
void | draw (Graphics &g, AffineTransform transform) const |
| Draws the glyph into a graphics context, with an extra transform applied to it. More...
|
|
void | createPath (Path &path) const |
| Returns the path for this glyph. More...
|
|
bool | hitTest (float x, float y) const |
| Checks to see if a point lies within this glyph. More...
|
|
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.
- See also
- GlyphArrangement, Font
◆ PositionedGlyph() [1/4]
PositionedGlyph::PositionedGlyph |
( |
| ) |
|
|
noexcept |
◆ PositionedGlyph() [2/4]
PositionedGlyph::PositionedGlyph |
( |
const Font & |
font, |
|
|
juce_wchar |
character, |
|
|
int |
glyphNumber, |
|
|
float |
anchorX, |
|
|
float |
baselineY, |
|
|
float |
width, |
|
|
bool |
isWhitespace |
|
) |
| |
◆ PositionedGlyph() [3/4]
◆ PositionedGlyph() [4/4]
◆ ~PositionedGlyph()
PositionedGlyph::~PositionedGlyph |
( |
| ) |
|
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ getCharacter()
juce_wchar PositionedGlyph::getCharacter |
( |
| ) |
const |
|
noexcept |
Returns the character the glyph represents.
◆ isWhitespace()
bool PositionedGlyph::isWhitespace |
( |
| ) |
const |
|
noexcept |
Checks whether the glyph is actually empty.
◆ getLeft()
float PositionedGlyph::getLeft |
( |
| ) |
const |
|
noexcept |
Returns the position of the glyph's left-hand edge.
◆ getRight()
float PositionedGlyph::getRight |
( |
| ) |
const |
|
noexcept |
Returns the position of the glyph's right-hand edge.
◆ getBaselineY()
float PositionedGlyph::getBaselineY |
( |
| ) |
const |
|
noexcept |
Returns the y position of the glyph's baseline.
◆ getTop()
float PositionedGlyph::getTop |
( |
| ) |
const |
◆ getBottom()
float PositionedGlyph::getBottom |
( |
| ) |
const |
◆ getBounds()
Rectangle<float> PositionedGlyph::getBounds |
( |
| ) |
const |
◆ moveBy()
void PositionedGlyph::moveBy |
( |
float |
deltaX, |
|
|
float |
deltaY |
|
) |
| |
Shifts the glyph's position by a relative amount.
◆ draw() [1/2]
void PositionedGlyph::draw |
( |
Graphics & |
g | ) |
const |
Draws the glyph into a graphics context.
(Note that this may change the context's currently selected font).
◆ draw() [2/2]
Draws the glyph into a graphics context, with an extra transform applied to it.
(Note that this may change the context's currently selected font).
◆ createPath()
void PositionedGlyph::createPath |
( |
Path & |
path | ) |
const |
Returns the path for this glyph.
- Parameters
-
path | the glyph's outline will be appended to this path |
◆ hitTest()
bool PositionedGlyph::hitTest |
( |
float |
x, |
|
|
float |
y |
|
) |
| const |
Checks to see if a point lies within this glyph.
The documentation for this class was generated from the following file: