openshot-audio  0.1.6
Public Member Functions | Friends | List of all members
PositionedGlyph Class Reference

#include <juce_GlyphArrangement.h>

Public Member Functions

 PositionedGlyph () noexcept
 
 PositionedGlyph (const Font &font, juce_wchar character, int glyphNumber, float anchorX, float baselineY, float width, bool isWhitespace)
 
 PositionedGlyph (const PositionedGlyph &)
 
PositionedGlyphoperator= (const PositionedGlyph &)
 
 ~PositionedGlyph ()
 
juce_wchar getCharacter () const noexcept
 
bool isWhitespace () const noexcept
 
float getLeft () const noexcept
 
float getRight () const noexcept
 
float getBaselineY () const noexcept
 
float getTop () const
 
float getBottom () const
 
Rectangle< float > getBounds () const
 
void moveBy (float deltaX, float deltaY)
 
void draw (Graphics &g) const
 
void draw (Graphics &g, const AffineTransform &transform) const
 
void createPath (Path &path) const
 
bool hitTest (float x, float y) const
 

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

Constructor & Destructor Documentation

PositionedGlyph::PositionedGlyph ( )
noexcept
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 ( )

Member Function Documentation

void PositionedGlyph::createPath ( Path path) const

Returns the path for this glyph.

Parameters
paththe glyph's outline will be appended to this path
void PositionedGlyph::draw ( Graphics g) const

Draws the glyph into a graphics context. (Note that this may change the context's currently selected font).

void PositionedGlyph::draw ( Graphics g,
const 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).

float PositionedGlyph::getBaselineY ( ) const
inlinenoexcept

Returns the y position of the glyph's baseline.

float PositionedGlyph::getBottom ( ) const
inline

Returns the y position of the bottom of the glyph.

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

Returns the bounds of the glyph.

juce_wchar PositionedGlyph::getCharacter ( ) const
inlinenoexcept

Returns the character the glyph represents.

float PositionedGlyph::getLeft ( ) const
inlinenoexcept

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

float PositionedGlyph::getRight ( ) const
inlinenoexcept

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

float PositionedGlyph::getTop ( ) const
inline

Returns the y position of the top of the glyph.

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

Checks to see if a point lies within this glyph.

bool PositionedGlyph::isWhitespace ( ) const
inlinenoexcept

Checks whether the glyph is actually empty.

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

Shifts the glyph's position by a relative amount.

PositionedGlyph & PositionedGlyph::operator= ( const PositionedGlyph other)

Friends And Related Function Documentation

friend class GlyphArrangement
friend

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