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

Method Draw

src/CellularPanel.cpp:1236–1264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1234}
1235
1236void CellularPanel::Draw( TrackPanelDrawingContext &context, unsigned nPasses )
1237{
1238 const auto panelRect = GetClientRect();
1239 auto lastCell = LastCell();
1240 for ( unsigned iPass = 0; iPass < nPasses; ++iPass ) {
1241
1242 VisitPostorder( [&]( const wxRect &rect, TrackPanelNode &node ) {
1243
1244 // Draw the node
1245 const auto newRect = node.DrawingArea(
1246 context, rect, panelRect, iPass );
1247 if ( newRect.Intersects( panelRect ) )
1248 node.Draw( context, newRect, iPass );
1249
1250 // Draw the current handle if it is associated with the node
1251 if ( &node == lastCell.get() ) {
1252 auto target = Target();
1253 if ( target ) {
1254 const auto targetRect =
1255 target->DrawingArea( context, rect, panelRect, iPass );
1256 if ( targetRect.Intersects( panelRect ) )
1257 target->Draw( context, targetRect, iPass );
1258 }
1259 }
1260
1261 } ); // nodes
1262
1263 } // passes
1264}

Callers

nothing calls this directly

Calls 3

IntersectsMethod · 0.80
DrawingAreaMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected