summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-10-02 00:12:49 +0100
committerCarl Hetherington <cth@carlh.net>2014-10-02 00:12:49 +0100
commit7f54537880570d624100ca2319c8394785ecf06f (patch)
tree601f624a56ee31d4378ff510e4832b0441cc7c82 /src
parentff970cab251af0588e02fa75f235f91539d12f19 (diff)
Clarify subtitle position with comments; add SubtitleString::set_v_position.
Diffstat (limited to 'src')
-rw-r--r--src/subtitle_string.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/subtitle_string.h b/src/subtitle_string.h
index 03d3d4f8..58710f7f 100644
--- a/src/subtitle_string.h
+++ b/src/subtitle_string.h
@@ -76,6 +76,9 @@ public:
return _text;
}
+ /** @return vertical position as a proportion of the screen height from the top
+ * (between 0 and 1)
+ */
float v_position () const {
return _v_position;
}
@@ -106,6 +109,13 @@ public:
int size_in_pixels (int screen_height) const;
+ /** @param p New vertical position as a proportion of the screen height
+ * from the top (between 0 and 1)
+ */
+ void set_v_position (float p) {
+ _v_position = p;
+ }
+
private:
/** font name */
std::string _font;