MCPcopy Create free account
hub / github.com/audacity/audacity / DoDrawMarks

Method DoDrawMarks

src/AdornedRulerPanel.cpp:2455–2473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2453}
2454
2455void AdornedRulerPanel::DoDrawMarks(wxDC * dc, bool /*text */ )
2456{
2457 const double min = Pos2Time(mInner.x);
2458 const double hiddenMin = Pos2Time(mInner.x, true);
2459 const double max = Pos2Time(mInner.x + mInner.width);
2460 const double hiddenMax = Pos2Time(mInner.x + mInner.width, true);
2461
2462 mRuler.SetTickColour( theTheme.Colour( TimelineTextColor() ) );
2463 mRuler.SetRange( min, max, hiddenMin, hiddenMax );
2464 if (mTimeDisplayMode == TimeDisplayMode::BeatsAndMeasures)
2465 {
2466 mRuler.SetTickLengths({ 5, 3, 1 });
2467 }
2468 else if (mTimeDisplayMode == TimeDisplayMode::MinutesAndSeconds)
2469 {
2470 mRuler.SetTickLengths({ 4, 2, 2 });
2471 }
2472 mRuler.Draw( *dc );
2473}
2474
2475void AdornedRulerPanel::DrawSelection()
2476{

Callers

nothing calls this directly

Calls 4

TimelineTextColorFunction · 0.85
SetTickLengthsMethod · 0.80
SetRangeMethod · 0.45
DrawMethod · 0.45

Tested by

no test coverage detected