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

Method DoDrawPlayRegion

src/AdornedRulerPanel.cpp:2513–2531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2511}
2512
2513void AdornedRulerPanel::DoDrawPlayRegion(
2514 wxDC * dc, const wxRect &rectP, const wxRect &rectL, const wxRect &rectR)
2515{
2516 const auto &viewInfo = ViewInfo::Get(*mProject);
2517 const auto& playRegion = viewInfo.playRegion;
2518
2519 const bool isActive = (mLastPlayRegionActive = playRegion.Active());
2520
2521 if (playRegion.IsLastActiveRegionClear())
2522 return;
2523
2524 // Paint the selected region bolder if independently varying, else dim
2525 const auto color = TimelineLoopRegionColor(isActive);
2526 dc->SetBrush( wxBrush( theTheme.Colour( color )) );
2527 dc->SetPen( wxPen( theTheme.Colour( color )) );
2528
2529 dc->DrawRectangle( rectP.Intersect(rectL) );
2530 dc->DrawRectangle( rectP.Intersect(rectR) );
2531}
2532
2533void AdornedRulerPanel::DoDrawPlayRegionLimits(wxDC * dc, const wxRect &rect)
2534{

Callers

nothing calls this directly

Calls 6

GetFunction · 0.85
TimelineLoopRegionColorFunction · 0.85
wxBrushClass · 0.85
wxPenClass · 0.85
IntersectMethod · 0.80

Tested by

no test coverage detected