JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
juce::PositionedGlyph Class Referencefinal

A glyph from a particular font, with a particular size, style, typeface and position. More...

#include "juce_GlyphArrangement.h"

Public Member Functions

 PositionedGlyph (const Font &font, juce_wchar character, int glyphNumber, float anchorX, float baselineY, float width, bool isWhitespace)
 
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.
 
Rectangle< floatgetBounds () const
 Returns the bounds of the glyph.
 
void moveBy (float deltaX, float deltaY)
 Shifts the glyph's position by a relative amount.
 
void draw (Graphics &g) const
 Draws the glyph into a graphics context.
 
void draw (Graphics &g, 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.
 

Friends

class GlyphArrangement
 

Detailed Description

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

@tags{Graphics}

Definition at line 41 of file juce_GlyphArrangement.h.

Constructor & Destructor Documentation

◆ PositionedGlyph() [1/2]

juce::PositionedGlyph::PositionedGlyph ( )
noexcept

Definition at line 37 of file juce_GlyphArrangement.cpp.

◆ PositionedGlyph() [2/2]

juce::PositionedGlyph::PositionedGlyph ( const Font font,
juce_wchar  character,
int  glyphNumber,
float  anchorX,
float  baselineY,
float  width,
bool  isWhitespace 
)

Definition at line 42 of file juce_GlyphArrangement.cpp.

Member Function Documentation

◆ createPath()

void juce::PositionedGlyph::createPath ( Path path) const

Returns the path for this glyph.

Parameters
paththe glyph's outline will be appended to this path

Definition at line 68 of file juce_GlyphArrangement.cpp.

◆ draw() [1/2]

void juce::PositionedGlyph::draw ( Graphics g) const

Draws the glyph into a graphics context.

(Note that this may change the context's currently selected font).

Definition at line 56 of file juce_GlyphArrangement.cpp.

◆ draw() [2/2]

void juce::PositionedGlyph::draw ( Graphics g,
AffineTransform  transform 
) const

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).

Definition at line 62 of file juce_GlyphArrangement.cpp.

◆ getBaselineY()

float juce::PositionedGlyph::getBaselineY ( ) const
noexcept

Returns the y position of the glyph's baseline.

Definition at line 60 of file juce_GlyphArrangement.h.

◆ getBottom()

float juce::PositionedGlyph::getBottom ( ) const

Returns the y position of the bottom of the glyph.

Definition at line 64 of file juce_GlyphArrangement.h.

◆ getBounds()

Rectangle< float > juce::PositionedGlyph::getBounds ( ) const

Returns the bounds of the glyph.

Definition at line 66 of file juce_GlyphArrangement.h.

◆ getCharacter()

juce_wchar juce::PositionedGlyph::getCharacter ( ) const
noexcept

Returns the character the glyph represents.

Definition at line 51 of file juce_GlyphArrangement.h.

◆ getLeft()

float juce::PositionedGlyph::getLeft ( ) const
noexcept

Returns the position of the glyph's left-hand edge.

Definition at line 56 of file juce_GlyphArrangement.h.

◆ getRight()

float juce::PositionedGlyph::getRight ( ) const
noexcept

Returns the position of the glyph's right-hand edge.

Definition at line 58 of file juce_GlyphArrangement.h.

◆ getTop()

float juce::PositionedGlyph::getTop ( ) const

Returns the y position of the top of the glyph.

Definition at line 62 of file juce_GlyphArrangement.h.

◆ hitTest()

bool juce::PositionedGlyph::hitTest ( float  x,
float  y 
) const

Checks to see if a point lies within this glyph.

Definition at line 83 of file juce_GlyphArrangement.cpp.

◆ isWhitespace()

bool juce::PositionedGlyph::isWhitespace ( ) const
noexcept

Checks whether the glyph is actually empty.

Definition at line 53 of file juce_GlyphArrangement.h.

◆ moveBy()

void juce::PositionedGlyph::moveBy ( float  deltaX,
float  deltaY 
)

Shifts the glyph's position by a relative amount.

Definition at line 103 of file juce_GlyphArrangement.cpp.

Friends And Related Symbol Documentation

◆ GlyphArrangement

friend class GlyphArrangement
friend

Definition at line 93 of file juce_GlyphArrangement.h.


The documentation for this class was generated from the following files: