Audacity 3.2.0
Functions
anonymous_namespace{Ruler.cpp} Namespace Reference

Functions

void FindFontHeights (wxCoord &height, wxCoord &lead, wxDC &dc, const wxFont &font)
 
void FindFontHeights (wxCoord &height, wxCoord &lead, wxDC &dc, int fontSize, wxFontWeight weight=wxFONTWEIGHT_NORMAL)
 

Function Documentation

◆ FindFontHeights() [1/2]

void anonymous_namespace{Ruler.cpp}::FindFontHeights ( wxCoord &  height,
wxCoord &  lead,
wxDC &  dc,
const wxFont &  font 
)

Definition at line 211 of file Ruler.cpp.

213{
214 wxCoord strW, strH, strD, strL;
215 static const wxString exampleText = wxT("0.9"); //ignored for height calcs on all platforms
216 dc.SetFont( font );
217 dc.GetTextExtent(exampleText, &strW, &strH, &strD, &strL);
218 height = strH - strD - strL;
219 lead = strL;
220}
wxT("CloseDown"))

References wxT().

Here is the call graph for this function:

◆ FindFontHeights() [2/2]

void anonymous_namespace{Ruler.cpp}::FindFontHeights ( wxCoord &  height,
wxCoord &  lead,
wxDC &  dc,
int  fontSize,
wxFontWeight  weight = wxFONTWEIGHT_NORMAL 
)

Definition at line 222 of file Ruler.cpp.

225{
226 const wxFont font{ fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, weight };
227 FindFontHeights( height, lead, dc, font );
228}
void FindFontHeights(wxCoord &height, wxCoord &lead, wxDC &dc, int fontSize, wxFontWeight weight=wxFONTWEIGHT_NORMAL)
Definition: Ruler.cpp:222

References FindFontHeights().

Referenced by Ruler::ChooseFonts(), FindFontHeights(), and Ruler::SetFonts().

Here is the call graph for this function:
Here is the caller graph for this function: