projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump ffcmp to fix ffmpeg dependency.
[dcpomatic.git]
/
src
/
lib
/
content_text.h
diff --git
a/src/lib/content_text.h
b/src/lib/content_text.h
index 17ec579dfb93685d3195414878bdb2f20485871b..51d4e8009942899c7008dcb838d27733de37af03 100644
(file)
--- a/
src/lib/content_text.h
+++ b/
src/lib/content_text.h
@@
-18,57
+18,69
@@
*/
*/
+
#ifndef DCPOMATIC_CONTENT_TEXT_H
#define DCPOMATIC_CONTENT_TEXT_H
#ifndef DCPOMATIC_CONTENT_TEXT_H
#define DCPOMATIC_CONTENT_TEXT_H
+
+#include "bitmap_text.h"
#include "dcpomatic_time.h"
#include "rect.h"
#include "dcpomatic_time.h"
#include "rect.h"
-#include "
bitmap
_text.h"
+#include "
string
_text.h"
#include <dcp/subtitle_string.h>
#include <dcp/subtitle_string.h>
-#include <list>
+#include <vector>
+
class Image;
class Image;
+
class ContentText
{
public:
class ContentText
{
public:
- explicit ContentText (ContentTime f)
+ explicit ContentText (
dcpomatic::
ContentTime f)
: _from (f)
{}
: _from (f)
{}
- ContentTime from () const {
+
dcpomatic::
ContentTime from () const {
return _from;
}
private:
return _from;
}
private:
- ContentTime _from;
+
dcpomatic::
ContentTime _from;
};
};
+
class ContentBitmapText : public ContentText
{
public:
class ContentBitmapText : public ContentText
{
public:
- ContentBitmapText (ContentTime f, boost::shared_ptr<Image> im, dcpomatic::Rect<double> r)
+ ContentBitmapText (dcpomatic::ContentTime from)
+ : ContentText(from)
+ {}
+
+ ContentBitmapText (dcpomatic::ContentTime f, std::shared_ptr<const Image> im, dcpomatic::Rect<double> r)
: ContentText (f)
: ContentText (f)
- , sub
(im, r)
+ , sub
s{ {im, r} }
{}
{}
- /* Our text
, with its rectangle
unmodified by any offsets or scales that the content specifies */
-
BitmapText sub
;
+ /* Our text
s, with their rectangles
unmodified by any offsets or scales that the content specifies */
+
std::vector<BitmapText> subs
;
};
};
-/** A text subtitle. We store the time period separately (as well as in the dcp::SubtitleStrings)
+
+/** 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.
*/
* 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 Content
Plain
Text : public ContentText
+class Content
String
Text : public ContentText
{
public:
{
public:
- Content
PlainText (ContentTime f, std::list<dcp::SubtitleString
> s)
+ Content
StringText (dcpomatic::ContentTime f, std::vector<StringText
> s)
: ContentText (f)
, subs (s)
{}
: ContentText (f)
, subs (s)
{}
- std::
list<dcp::SubtitleString
> subs;
+ std::
vector<StringText
> subs;
};
};
+
#endif
#endif