X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcontent_text.h;h=cd9d34bf90bce7de028a930b63d15e5316b6d830;hb=2975fa5cd5dcfaa806b07ef39c8900e07f417658;hp=0c0df1ee63bdce15f3c5d9905af302c31a10c43d;hpb=c4403784febdbdd42e9c32e67fadb147f11fe566;p=dcpomatic.git diff --git a/src/lib/content_text.h b/src/lib/content_text.h index 0c0df1ee6..cd9d34bf9 100644 --- a/src/lib/content_text.h +++ b/src/lib/content_text.h @@ -18,18 +18,22 @@ */ + #ifndef DCPOMATIC_CONTENT_TEXT_H #define DCPOMATIC_CONTENT_TEXT_H + +#include "bitmap_text.h" #include "dcpomatic_time.h" #include "rect.h" #include "types.h" -#include "bitmap_text.h" #include -#include +#include + class Image; + class ContentText { public: @@ -45,18 +49,24 @@ private: dcpomatic::ContentTime _from; }; + class ContentBitmapText : public ContentText { public: - ContentBitmapText (dcpomatic::ContentTime f, boost::shared_ptr im, dcpomatic::Rect r) + ContentBitmapText (dcpomatic::ContentTime from) + : ContentText(from) + {} + + ContentBitmapText (dcpomatic::ContentTime f, std::shared_ptr im, dcpomatic::Rect r) : ContentText (f) - , sub (im, r) + , subs{ {im, r} } {} - /* Our text, with its rectangle unmodified by any offsets or scales that the content specifies */ - BitmapText sub; + /* Our texts, with their rectangles unmodified by any offsets or scales that the content specifies */ + std::vector 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. @@ -64,12 +74,13 @@ public: class ContentStringText : public ContentText { public: - ContentStringText (dcpomatic::ContentTime f, std::list s) + ContentStringText (dcpomatic::ContentTime f, std::vector s) : ContentText (f) , subs (s) {} - std::list subs; + std::vector subs; }; + #endif