summaryrefslogtreecommitdiff
path: root/src/subtitle_asset.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-08-22 00:11:18 +0100
committerCarl Hetherington <cth@carlh.net>2012-08-22 00:11:18 +0100
commit9b84debc374f426bb3a00baa82bae5fdd88a018e (patch)
tree71cc6972a48f469cd83dc0b0ee60953645390fd4 /src/subtitle_asset.h
parentdf6ed597b720399f02e7b75a7cf448d0956c89a1 (diff)
Some maths operations with Time.
Diffstat (limited to 'src/subtitle_asset.h')
-rw-r--r--src/subtitle_asset.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/subtitle_asset.h b/src/subtitle_asset.h
index d272957e..607b054d 100644
--- a/src/subtitle_asset.h
+++ b/src/subtitle_asset.h
@@ -33,6 +33,12 @@ public:
float v_position;
VAlign v_align;
std::string text;
+ Time fade_up_time;
+ Time fade_down_time;
+
+private:
+ Time fade_time (std::string name);
+
};
class SubtitleNode : public XMLNode
@@ -88,7 +94,9 @@ public:
VAlign v_align,
std::string text,
Effect effect,
- Color effect_color
+ Color effect_color,
+ Time fade_up_time,
+ Time fade_down_time
);
std::string font () const {
@@ -131,6 +139,14 @@ public:
return _effect_color;
}
+ Time fade_up_time () const {
+ return _fade_up_time;
+ }
+
+ Time fade_down_time () const {
+ return _fade_down_time;
+ }
+
int size_in_pixels (int screen_height) const;
private:
@@ -145,6 +161,8 @@ private:
std::string _text;
Effect _effect;
Color _effect_color;
+ Time _fade_up_time;
+ Time _fade_down_time;
};
class SubtitleAsset : public Asset, public XMLFile