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)
 
double ComputeWarpedLength (const Envelope &env, double t0, double t1)
 
double SolveWarpedLength (const Envelope &env, double t0, double length)
 

Function Documentation

◆ ComputeWarpedLength()

double anonymous_namespace{Ruler.cpp}::ComputeWarpedLength ( const Envelope env,
double  t0,
double  t1 
)

Definition at line 989 of file Ruler.cpp.

990{
991 return env.IntegralOfInverse(t0, t1);
992}
double IntegralOfInverse(double t0, double t1) const
Definition: Envelope.cpp:1234

References Envelope::IntegralOfInverse().

Referenced by Ruler::Updater::UpdateLinear().

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

◆ FindFontHeights() [1/2]

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

Definition at line 258 of file Ruler.cpp.

260{
261 wxCoord strW, strH, strD, strL;
262 static const wxString exampleText = wxT("0.9"); //ignored for height calcs on all platforms
263 dc.SetFont( font );
264 dc.GetTextExtent(exampleText, &strW, &strH, &strD, &strL);
265 height = strH - strD - strL;
266 lead = strL;
267}
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 269 of file Ruler.cpp.

272{
273 const wxFont font{ fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, weight };
274 FindFontHeights( height, lead, dc, font );
275}
void FindFontHeights(wxCoord &height, wxCoord &lead, wxDC &dc, int fontSize, wxFontWeight weight=wxFONTWEIGHT_NORMAL)
Definition: Ruler.cpp:269

References FindFontHeights().

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

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

◆ SolveWarpedLength()

double anonymous_namespace{Ruler.cpp}::SolveWarpedLength ( const Envelope env,
double  t0,
double  length 
)

Definition at line 994 of file Ruler.cpp.

995{
996 return env.SolveIntegralOfInverse(t0, length);
997}
double SolveIntegralOfInverse(double t0, double area) const
Definition: Envelope.cpp:1297

References Envelope::SolveIntegralOfInverse().

Here is the call graph for this function: