X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcontent_text.h;h=06fb39cfce6c423166c465a07d4d59af5367ef7e;hb=182b9d2e2feb6545592868606aaf0f0146095481;hp=5edb9af2083be0993339caefa876dc09e3627e7d;hpb=c59981ce92898f6be6987f10ebb29161e36e6766;p=dcpomatic.git diff --git a/src/lib/content_text.h b/src/lib/content_text.h index 5edb9af20..06fb39cfc 100644 --- a/src/lib/content_text.h +++ b/src/lib/content_text.h @@ -18,18 +18,23 @@ */ + #ifndef DCPOMATIC_CONTENT_TEXT_H #define DCPOMATIC_CONTENT_TEXT_H + +#include "bitmap_text.h" #include "dcpomatic_time.h" #include "rect.h" +#include "string_text.h" #include "types.h" -#include "bitmap_text.h" #include -#include +#include + class Image; + class ContentText { public: @@ -45,18 +50,24 @@ private: dcpomatic::ContentTime _from; }; + class ContentBitmapText : public ContentText { public: + 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 +75,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