return (a.width == b.width && a.height == b.height);
}
+bool operator!= (Size const & a, Size const & b)
+{
+ return !(a == b);
+}
+
bool operator== (Crop const & a, Crop const & b)
{
return (a.left == b.left && a.right == b.right && a.top == b.top && a.bottom == b.bottom);
};
extern bool operator== (Size const & a, Size const & b);
+extern bool operator!= (Size const & a, Size const & b);
/** @struct Crop
* @brief A description of the crop of an image or video.
}
_with_subtitles->Enable (h);
- _subtitle_stream->Enable (_film->with_subtitles ());
- _subtitle_offset->Enable (_film->with_subtitles ());
- _subtitle_scale->Enable (_film->with_subtitles ());
+
+ bool j = false;
+ if (_film) {
+ j = _film->with_subtitles ();
+ }
+
+ _subtitle_stream->Enable (j);
+ _subtitle_offset->Enable (j);
+ _subtitle_scale->Enable (j);
}
void
, _out_height (0)
, _panel_width (0)
, _panel_height (0)
+ , _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_width || !_out_height) {
dc.Clear ();
return;
return;
}
+ Size old_size;
+ if (_display_frame) {
+ old_size = _display_frame->size();
+ }
+
/* Get a compacted image as we have to feed it to wxWidgets */
_display_frame = _raw_frame->scale_and_convert_to_rgb (Size (_out_width, _out_height), 0, _film->scaler(), false);
+ if (old_size != _display_frame->size()) {
+ _clear_required = true;
+ }
+
if (_raw_sub) {
Rect tx = subtitle_transformed_area (
float (_out_width) / _film->size().width,
int _out_height;
int _panel_width;
int _panel_height;
+
+ bool _clear_required;
};