diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-10-08 09:54:26 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-10-08 09:54:26 +0100 |
| commit | c76e5b38ae1275a9e7d879f001268e000b652252 (patch) | |
| tree | 880768f9a694dbe097b97a6f46bbe410214d27d0 /src/wx/audio_plot.cc | |
| parent | 92788ff5fe57c4b662101d2c0032449f6840a045 (diff) | |
Simplify (maybe) wxPen use to see if it helps with OS X crashes (at src/osx/carbon/graphics.cpp:143).
Diffstat (limited to 'src/wx/audio_plot.cc')
| -rw-r--r-- | src/wx/audio_plot.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wx/audio_plot.cc b/src/wx/audio_plot.cc index c4e5d992f..641ddd503 100644 --- a/src/wx/audio_plot.cc +++ b/src/wx/audio_plot.cc @@ -159,7 +159,7 @@ AudioPlot::paint () gc->DrawText (std_to_wx (String::compose ("%1dB", i)), 0, y - (db_label_height / 2)); } - gc->SetPen (*wxLIGHT_GREY_PEN); + gc->SetPen (wxPen (wxColour (200, 200, 200))); gc->StrokePath (grid); gc->DrawText (_("Time"), data_width, metrics.height - metrics.y_origin + db_label_height / 2); @@ -171,7 +171,7 @@ AudioPlot::paint () plot_peak (p, c, metrics); } wxColour const col = _colours[c]; - gc->SetPen (*wxThePenList->FindOrCreatePen (wxColour (col.Red(), col.Green(), col.Blue(), col.Alpha() / 2), 1, wxPENSTYLE_SOLID)); + gc->SetPen (wxPen (wxColour (col.Red(), col.Green(), col.Blue(), col.Alpha() / 2), 1, wxPENSTYLE_SOLID)); gc->StrokePath (p); } } @@ -183,7 +183,7 @@ AudioPlot::paint () plot_rms (p, c, metrics); } wxColour const col = _colours[c]; - gc->SetPen (*wxThePenList->FindOrCreatePen (col, 1, wxPENSTYLE_SOLID)); + gc->SetPen (wxPen (col, 1, wxPENSTYLE_SOLID)); gc->StrokePath (p); } } @@ -192,7 +192,7 @@ AudioPlot::paint () axes.MoveToPoint (metrics.db_label_width, 0); axes.AddLineToPoint (metrics.db_label_width, metrics.height - metrics.y_origin); axes.AddLineToPoint (metrics.db_label_width + data_width, metrics.height - metrics.y_origin); - gc->SetPen (*wxBLACK_PEN); + gc->SetPen (wxPen (wxColour (0, 0, 0))); gc->StrokePath (axes); delete gc; |
