class ContentText
{
public:
- explicit ContentText (ContentTime f, TextType t)
+ explicit ContentText (dcpomatic::ContentTime f)
: _from (f)
- , _type (t)
{}
- ContentTime from () const {
+ dcpomatic::ContentTime from () const {
return _from;
}
- TextType type () const {
- return _type;
- }
-
private:
- ContentTime _from;
- TextType _type;
+ dcpomatic::ContentTime _from;
};
-class ContentBitmapCaption : public ContentText
+
+class ContentBitmapText : public ContentText
{
public:
- ContentBitmapCaption (ContentTime f, TextType type, boost::shared_ptr<Image> im, dcpomatic::Rect<double> r)
- : ContentText (f, type)
- , sub (im, r)
+ ContentBitmapText (dcpomatic::ContentTime from)
+ : ContentText(from)
{}
- /* Our text, with its rectangle unmodified by any offsets or scales that the content specifies */
- BitmapText sub;
+ ContentBitmapText (dcpomatic::ContentTime f, std::shared_ptr<const Image> im, dcpomatic::Rect<double> r)
+ : ContentText (f)
+ , subs{ {im, r} }
+ {}
+
+ /* Our texts, with their rectangles unmodified by any offsets or scales that the content specifies */
+ std::vector<BitmapText> subs;
};
+
/** A text caption. We store the time period separately (as well as in the dcp::SubtitleStrings)
* as the dcp::SubtitleString timings are sometimes quite heavily quantised and this causes problems
* when we want to compare the quantised periods to the unquantised ones.
*/
-class ContentTextCaption : public ContentText
+class ContentStringText : public ContentText
{
public:
- ContentTextCaption (ContentTime f, TextType type, std::list<dcp::SubtitleString> s)
- : ContentText (f, type)
+ ContentStringText (dcpomatic::ContentTime f, std::list<dcp::SubtitleString> s)
+ : ContentText (f)
, subs (s)
{}