diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-07-22 16:32:37 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-07-22 16:32:37 +0100 |
| commit | 0f60e0f52c986f18764822de78b82b4163909f0c (patch) | |
| tree | 9fd45bd68de68ee47551efcdcf955344ad1fc87a /src/lib/player_video.cc | |
| parent | 7523c7f0ab64f075ca535071b780098f6c05fce6 (diff) | |
Option to draw a border around the content's image (#391).
Diffstat (limited to 'src/lib/player_video.cc')
| -rw-r--r-- | src/lib/player_video.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/player_video.cc b/src/lib/player_video.cc index a44264ced..8fd966e5f 100644 --- a/src/lib/player_video.cc +++ b/src/lib/player_video.cc @@ -111,8 +111,6 @@ PlayerVideo::image (bool burn_subtitle) const shared_ptr<Image> out = im->crop_scale_window (total_crop, _inter_size, _out_size, _scaler, PIX_FMT_RGB24, true); - Position<int> const container_offset ((_out_size.width - _inter_size.width) / 2, (_out_size.height - _inter_size.width) / 2); - if (burn_subtitle && _subtitle.image) { out->alpha_blend (_subtitle.image, _subtitle.position); } @@ -171,3 +169,11 @@ PlayerVideo::j2k () const assert (j2k); return j2k->j2k (); } + +Position<int> +PlayerVideo::inter_position () const +{ + return Position<int> ((_out_size.width - _inter_size.width) / 2, (_out_size.height - _inter_size.height) / 2); +} + + |
