X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fsubtitle_string.h;h=2dfdbe0a04b20358ffb1048493df748917e84487;hb=2ae92dcc97765deb2845dd07a338858aeb375cb3;hp=ba975778ae1eced62b197af1cd2b56403d811f83;hpb=4b0ece8d964961598ce4734ce25bb0aed66dbf7a;p=libdcp.git diff --git a/src/subtitle_string.h b/src/subtitle_string.h index ba975778..2dfdbe0a 100644 --- a/src/subtitle_string.h +++ b/src/subtitle_string.h @@ -45,6 +45,8 @@ public: float aspect_adjust, Time in, Time out, + float h_position, + HAlign h_align, float v_position, VAlign v_align, std::string text, @@ -79,6 +81,14 @@ public: return _text; } + float h_position () const { + return _h_position; + } + + HAlign h_align () const { + return _h_align; + } + /** @return vertical position as a proportion of the screen height from the top * (between 0 and 1) */ @@ -120,6 +130,10 @@ public: return _aspect_adjust; } + void set_h_position (float p) { + _h_position = p; + } + /** @param p New vertical position as a proportion of the screen height * from the top (between 0 and 1) */ @@ -131,6 +145,10 @@ public: _size = s; } + void set_aspect_adjust (float a) { + _aspect_adjust = a; + } + private: /** font ID */ boost::optional _font; @@ -140,11 +158,16 @@ private: Colour _colour; /** Size in points as if the screen height is 11 inches, so a 72pt font * would be 1/11th of the screen height. - */ + */ int _size; float _aspect_adjust; Time _in; Time _out; + /** Horizontal position as a proportion of the screen width from the _h_align + * (between 0 and 1) + */ + float _h_position; + HAlign _h_align; /** Vertical position as a proportion of the screen height from the _v_align * (between 0 and 1) */