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_;
80 enum FontStyle :
int {
81 kFontStyleRegular = 0,
90 void setFont(
const char *fontname,
int height = 18, FontStyle type = kFontStyleRegular);
92 void setColor(byte r, byte g, byte b);
93 void setPadding(uint16 horizontal, uint16 vertical);
94 bool drawSubtitle(uint32 timestamp,
bool force =
false,
bool showSFX =
false)
const;
98 return _srtParser->isSfx();
100 bool isLoaded()
const {
return _loaded || _subtitleDev; }
101 virtual void clearSubtitle()
const;
104 bool recalculateBoundingBox()
const;
105 void renderSubtitle()
const;
106 void translateBBox(int16 dx, int16 dy)
const { _realBBox.translate(dx, dy); }
107 virtual void updateSubtitleOverlay()
const;
108 virtual bool shouldShowSubtitle()
const {
return true; }
112 mutable uint16 _splitPartCount = 0;
117 bool _overlayHasAlpha;
129 mutable int16 _lastOverlayWidth, _lastOverlayHeight;
134 uint32 _transparentColor;
Definition: subtitles.h:38
Definition: subtitles.h:78
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