, _play_button (new wxToggleButton (this, wxID_ANY, _("Play")))
, _display_frame_x (0)
, _got_frame (false)
- , _clear_required (false)
{
_panel->SetDoubleBuffered (true);
#if wxMAJOR_VERSION == 2 && wxMINOR_VERSION >= 9
{
wxPaintDC dc (_panel);
- if (_clear_required) {
- dc.Clear ();
- _clear_required = false;
- }
-
if (!_display_frame || !_film || !_out_size.width || !_out_size.height) {
dc.Clear ();
return;
wxBitmap sub_bitmap (sub);
dc.DrawBitmap (sub_bitmap, _display_sub_position.x, _display_sub_position.y);
}
+
+ if (_film_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);
+ }
+
+ if (_film_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);
+ }
}
return;
}
- libdcp::Size old_size;
- if (_display_frame) {
- old_size = _display_frame->size();
- }
-
shared_ptr<Image> input = _raw_frame;
pair<string, string> const s = Filter::ffmpeg_strings (_film->filters());
/* Get a compacted image as we have to feed it to wxWidgets */
_display_frame = input->scale_and_convert_to_rgb (_film_size, 0, _film->scaler(), false);
- if (old_size != _display_frame->size()) {
- _clear_required = true;
- }
-
if (_raw_sub) {
/* Our output is already cropped by the decoder, so we need to account for that