diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-08-16 13:26:57 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-08-16 13:26:57 +0100 |
| commit | 533de5cc51d93a8403816fc0f04ca1d5aa733242 (patch) | |
| tree | 33e7457560650bb4e408165bb93d3a1eda17c47b /src/wx/video_waveform_plot.cc | |
| parent | a9228a36ed335dc0a624f0d65b9a2d9e42bec3b0 (diff) | |
Fix bit chopped off right hand side of video waveform.
Diffstat (limited to 'src/wx/video_waveform_plot.cc')
| -rw-r--r-- | src/wx/video_waveform_plot.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wx/video_waveform_plot.cc b/src/wx/video_waveform_plot.cc index eb2cf97c6..e2083caa6 100644 --- a/src/wx/video_waveform_plot.cc +++ b/src/wx/video_waveform_plot.cc @@ -38,6 +38,7 @@ using boost::shared_ptr; using dcp::locale_convert; int const VideoWaveformPlot::_vertical_margin = 8; +int const VideoWaveformPlot::_x_axis_width = 52; VideoWaveformPlot::VideoWaveformPlot (wxWindow* parent, FilmViewer* viewer) : wxPanel (parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE) @@ -78,7 +79,6 @@ VideoWaveformPlot::paint () return; } - int const axis_x = 48; int const height = _waveform->size().height; gc->SetPen (wxPen (wxColour (255, 255, 255), 1, wxPENSTYLE_SOLID)); @@ -108,7 +108,7 @@ VideoWaveformPlot::paint () wxGraphicsPath p = gc->CreatePath (); int const y = _vertical_margin + height - (i * height / label_gaps) - 1; p.MoveToPoint (label_width + 8, y); - p.AddLineToPoint (axis_x, y); + p.AddLineToPoint (_x_axis_width - 4, y); gc->StrokePath (p); int x = 4; int const n = i * 4096 / label_gaps; @@ -124,7 +124,7 @@ VideoWaveformPlot::paint () wxImage waveform (_waveform->size().width, height, _waveform->data()[0], true); wxBitmap bitmap (waveform); - gc->DrawBitmap (bitmap, axis_x + 4, _vertical_margin, _waveform->size().width, height); + gc->DrawBitmap (bitmap, _x_axis_width, _vertical_margin, _waveform->size().width, height); delete gc; } @@ -166,7 +166,7 @@ VideoWaveformPlot::create_waveform () } _waveform = _waveform->scale ( - dcp::Size (GetSize().GetWidth() - 32, waveform_height), + dcp::Size (GetSize().GetWidth() - _x_axis_width, waveform_height), dcp::YUV_TO_RGB_REC709, AV_PIX_FMT_RGB24, false, false ); } |
