diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-01-29 22:03:05 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-01-29 22:03:05 +0000 |
| commit | 62a1e9d6cda70050b813d4ba0c3e83b7350f360d (patch) | |
| tree | a2aaf87d4f41544a497b9a9ea65203048b1406d5 /src/lib/player.cc | |
| parent | 4c2ae591ee17599b4fbb7ffc24a06f27ed985c05 (diff) | |
Add subtitle X offset option.
Suggested-by: Thierry Journet
Diffstat (limited to 'src/lib/player.cc')
| -rw-r--r-- | src/lib/player.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index 1c54d0fc5..e661a7b36 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -521,7 +521,11 @@ Player::content_changed (weak_ptr<Content> w, int property, bool frequent) _have_valid_pieces = false; Changed (frequent); - } else if (property == SubtitleContentProperty::SUBTITLE_OFFSET || property == SubtitleContentProperty::SUBTITLE_SCALE) { + } else if ( + property == SubtitleContentProperty::SUBTITLE_X_OFFSET || + property == SubtitleContentProperty::SUBTITLE_Y_OFFSET || + property == SubtitleContentProperty::SUBTITLE_SCALE + ) { update_subtitle (); Changed (frequent); @@ -658,7 +662,8 @@ Player::update_subtitle () dcpomatic::Rect<double> in_rect = _in_subtitle.rect; libdcp::Size scaled_size; - in_rect.y += sc->subtitle_offset (); + in_rect.x += sc->subtitle_x_offset (); + in_rect.y += sc->subtitle_y_offset (); /* We will scale the subtitle up to fit _video_container_size, and also by the additional subtitle_scale */ scaled_size.width = in_rect.width * _video_container_size.width * sc->subtitle_scale (); |
