From 62f86da8d2b0daa2237e33653a3e837e6f395573 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 10 Apr 2013 11:38:05 +0100 Subject: Try to fix problems with view of padded stuff. --- src/wx/film_viewer.cc | 8 ++++---- src/wx/film_viewer.h | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 4dca5cad8..18ddf1eb2 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -222,20 +222,20 @@ FilmViewer::paint_panel (wxPaintEvent &) dc.DrawBitmap (sub_bitmap, _display_sub_position.x, _display_sub_position.y); } - if (_film_size.width < _panel_size.width) { + if (_out_size.width < _panel_size.width) { wxPen p (GetBackgroundColour ()); wxBrush b (GetBackgroundColour ()); dc.SetPen (p); dc.SetBrush (b); - dc.DrawRectangle (_film_size.width, 0, _panel_size.width - _film_size.width, _panel_size.height); + dc.DrawRectangle (_out_size.width, 0, _panel_size.width - _out_size.width, _panel_size.height); } - if (_film_size.height < _panel_size.height) { + if (_out_size.height < _panel_size.height) { wxPen p (GetBackgroundColour ()); wxBrush b (GetBackgroundColour ()); dc.SetPen (p); dc.SetBrush (b); - dc.DrawRectangle (0, _film_size.height, _panel_size.width, _panel_size.height - _film_size.height); + dc.DrawRectangle (0, _out_size.height, _panel_size.width, _panel_size.height - _out_size.height); } } diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h index f89269d2b..784434f6b 100644 --- a/src/wx/film_viewer.h +++ b/src/wx/film_viewer.h @@ -69,6 +69,9 @@ private: boost::shared_ptr _raw_frame; boost::shared_ptr _raw_sub; boost::shared_ptr _display_frame; + /* The x offset at which we display the actual film content; this corresponds + to the film's padding converted to our coordinates. + */ int _display_frame_x; boost::shared_ptr _display_sub; Position _display_sub_position; -- cgit v1.2.3