JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::GlyphArrangementOptions Class Referencefinal

Options that can be used to affect the layout produced by GlyphArrangement::addFittedText. More...

#include <juce_GlyphArrangementOptions.h>

Collaboration diagram for juce::GlyphArrangementOptions:

Public Member Functions

const auto & getLineHeightMultiple () const
 
const auto & getLineSpacing () const
 
bool operator!= (const GlyphArrangementOptions &other) const
 Inequality operator.
 
bool operator< (const GlyphArrangementOptions &other) const
 Less-than operator.
 
bool operator<= (const GlyphArrangementOptions &other) const
 Less-than-or-equal operator.
 
bool operator== (const GlyphArrangementOptions &other) const
 Equality operator.
 
bool operator> (const GlyphArrangementOptions &other) const
 Greater-than operator.
 
bool operator>= (const GlyphArrangementOptions &other) const
 Greater-than-or-equal operator.
 
GlyphArrangementOptions withLineHeightMultiple (float x) const
 We multiply the original distance between the baselines of subsequent lines with this value.
 
GlyphArrangementOptions withLineSpacing (float x) const
 We increment the distance between the baselines of subsequent lines with this value.
 

Private Member Functions

auto tie () const noexcept
 

Private Attributes

float lineHeightMultiple = 1.0f
 
float lineSpacing = 0.0f
 

Detailed Description

Options that can be used to affect the layout produced by GlyphArrangement::addFittedText.

See also
GlyphArrangement::addFittedText

@tags{Graphics}

Member Function Documentation

◆ getLineHeightMultiple()

const auto & juce::GlyphArrangementOptions::getLineHeightMultiple ( ) const
inline

◆ getLineSpacing()

const auto & juce::GlyphArrangementOptions::getLineSpacing ( ) const
inline

◆ operator!=()

bool juce::GlyphArrangementOptions::operator!= ( const GlyphArrangementOptions other) const

Inequality operator.

◆ operator<()

bool juce::GlyphArrangementOptions::operator< ( const GlyphArrangementOptions other) const

Less-than operator.

Allows GlyphArrangementOptions to be used as keys in a map.

◆ operator<=()

bool juce::GlyphArrangementOptions::operator<= ( const GlyphArrangementOptions other) const

Less-than-or-equal operator.

◆ operator==()

bool juce::GlyphArrangementOptions::operator== ( const GlyphArrangementOptions other) const

Equality operator.

◆ operator>()

bool juce::GlyphArrangementOptions::operator> ( const GlyphArrangementOptions other) const

Greater-than operator.

◆ operator>=()

bool juce::GlyphArrangementOptions::operator>= ( const GlyphArrangementOptions other) const

Greater-than-or-equal operator.

◆ tie()

auto juce::GlyphArrangementOptions::tie ( ) const
privatenoexcept

◆ withLineHeightMultiple()

GlyphArrangementOptions juce::GlyphArrangementOptions::withLineHeightMultiple ( float  x) const
inline

We multiply the original distance between the baselines of subsequent lines with this value.

The line height multiple is applied to both the ascender and descender, hence it affects the first line's baseline.

The total distance between baselines is lineHeight * lineHeightMultiple + lineSpacing.

References juce::withMember().

◆ withLineSpacing()

GlyphArrangementOptions juce::GlyphArrangementOptions::withLineSpacing ( float  x) const
inline

We increment the distance between the baselines of subsequent lines with this value.

Line spacing is added below the line's descender, and doesn't affect the first line's baseline.

The total distance between baselines is lineHeight * lineHeightMultiple + lineSpacing.

References juce::withMember().

Member Data Documentation

◆ lineHeightMultiple

float juce::GlyphArrangementOptions::lineHeightMultiple = 1.0f
private

◆ lineSpacing

float juce::GlyphArrangementOptions::lineSpacing = 0.0f
private

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