1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-21 14:02:57 +02:00

Pass more context information into drawing routines

This commit is contained in:
Paul Licameli
2017-06-23 19:28:38 -04:00
parent f09a7be3dc
commit ada4b6307d
12 changed files with 121 additions and 65 deletions

View File

@@ -32,6 +32,8 @@
#include "Experimental.h"
#include "TrackPanelDrawingContext.h"
// Globals, so that we remember settings from session to session
wxPrintData &gPrintData()
{
@@ -97,7 +99,9 @@ bool AudacityPrintout::OnPrintPage(int WXUNUSED(page))
r.width = width;
r.height = (int)(n->GetHeight() * scale);
artist.DrawTrack(n, *dc, r, SelectedRegion(), zoomInfo, false, false, false, false);
TrackPanelDrawingContext context{ *dc, {}, {} };
artist.DrawTrack(
context, n, r, SelectedRegion(), zoomInfo, false, false, false, false);
dc->SetPen(*wxBLACK_PEN);
AColor::Line(*dc, 0, r.y, width, r.y);