diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-07-02 14:19:21 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-07-02 14:19:21 +0100 |
| commit | 712f8144f1992364d79a80b2b586248423f7ac11 (patch) | |
| tree | 09a26e5ae303a3ae3e9cc44d0da0fbb3ae7c455a /src/lib/image_subtitle.h | |
| parent | bc9458cbe39a24d22c199c82efab524208dc347d (diff) | |
Rearrange Player subtitle handling a bit.
Diffstat (limited to 'src/lib/image_subtitle.h')
| -rw-r--r-- | src/lib/image_subtitle.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/lib/image_subtitle.h b/src/lib/image_subtitle.h new file mode 100644 index 000000000..6a4f902e6 --- /dev/null +++ b/src/lib/image_subtitle.h @@ -0,0 +1,39 @@ +/* + Copyright (C) 2014 Carl Hetherington <cth@carlh.net> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +class Image; + +class ImageSubtitle +{ +public: + ImageSubtitle (boost::shared_ptr<Image> i, dcpomatic::Rect<double> r) + : image (i) + , rectangle (r) + {} + + boost::shared_ptr<Image> image; + /** Area that the subtitle covers on its corresponding video, expressed in + * proportions of the image size; e.g. rectangle.x = 0.5 would mean that + * the rectangle starts half-way across the video. + * + * This rectangle may or may not have had a SubtitleContent's offsets and + * scale applied to it, depending on context. + */ + dcpomatic::Rect<double> rectangle; +}; |
