22 #ifndef VIDEO_SUBTITLES_H 23 #define VIDEO_SUBTITLES_H 25 #include "common/str.h" 26 #include "common/array.h" 27 #include "common/hashmap.h" 28 #include "common/rect.h" 30 #include "graphics/surface.h" 52 SRTEntry(uint seq_, uint32 start_, uint32 end_) {
53 seq = seq_; start = start_; end = end_;
58 seq = seq_; start = start_; end = end_;
79 enum FontStyle :
int {
80 kFontStyleRegular = 0,
88 void close() { _loaded =
false; _parts =
nullptr; _fname.clear(); _srtParser.cleanup(); }
89 void setFont(
const char *fontname,
int height = 18, FontStyle type = kFontStyleRegular);
91 void setColor(byte r, byte g, byte b);
92 void setPadding(uint16 horizontal, uint16 vertical);
93 bool drawSubtitle(uint32 timestamp,
bool force =
false,
bool showSFX =
false)
const;
94 bool isLoaded()
const {
return _loaded || _subtitleDev; }
97 void renderSubtitle()
const;
102 bool _overlayHasAlpha;
114 mutable int16 _lastOverlayWidth, _lastOverlayHeight;
120 uint32 _transparentColor;
Definition: subtitles.h:38
Definition: subtitles.h:77
void push_back(const T &element)
Definition: array.h:181
Definition: formatinfo.h:28
Definition: subtitles.h:45
Definition: subtitles.h:63
Definition: animation.h:37