From 7f54537880570d624100ca2319c8394785ecf06f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 2 Oct 2014 00:12:49 +0100 Subject: Clarify subtitle position with comments; add SubtitleString::set_v_position. --- src/subtitle_string.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/subtitle_string.h') 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; -- cgit v1.2.3