mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-21 14:02:57 +02:00
Carry more information in TrackPanelDrawingContext; fewer arguments
This commit is contained in:
@@ -88,7 +88,10 @@ bool AudacityPrintout::OnPrintPage(int WXUNUSED(page))
|
||||
artist.SetBackgroundBrushes(*wxWHITE_BRUSH, *wxWHITE_BRUSH,
|
||||
*wxWHITE_PEN, *wxWHITE_PEN);
|
||||
const double screenDuration = mTracks->GetEndTime();
|
||||
SelectedRegion region{};
|
||||
artist.pSelectedRegion = ®ion;
|
||||
ZoomInfo zoomInfo(0.0, width / screenDuration);
|
||||
artist.pZoomInfo = &zoomInfo;
|
||||
int y = rulerPageHeight;
|
||||
|
||||
for (auto n : mTracks->Any()) {
|
||||
@@ -98,9 +101,10 @@ bool AudacityPrintout::OnPrintPage(int WXUNUSED(page))
|
||||
r.width = width;
|
||||
r.height = (int)(n->GetHeight() * scale);
|
||||
|
||||
TrackPanelDrawingContext context{ *dc, {}, {} };
|
||||
artist.DrawTrack(
|
||||
context, n, r, SelectedRegion(), zoomInfo, false, false, false, false);
|
||||
TrackPanelDrawingContext context{
|
||||
*dc, {}, {}, &artist
|
||||
};
|
||||
artist.DrawTrack( context, n, r );
|
||||
|
||||
dc->SetPen(*wxBLACK_PEN);
|
||||
AColor::Line(*dc, 0, r.y, width, r.y);
|
||||
|
Reference in New Issue
Block a user