diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-03 16:09:24 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-03 16:09:24 +0100 |
| commit | 4b0ece8d964961598ce4734ce25bb0aed66dbf7a (patch) | |
| tree | e13cc114733d155353e8e20c73d96627a5ceb1a0 /src/subtitle_string.h | |
| parent | 5e4c87ae58f1ed73b9ef19cd75210963599fa546 (diff) | |
Add AspectAdjust to subtitles.
Diffstat (limited to 'src/subtitle_string.h')
| -rw-r--r-- | src/subtitle_string.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/subtitle_string.h b/src/subtitle_string.h index 966ae8cb..ba975778 100644 --- a/src/subtitle_string.h +++ b/src/subtitle_string.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net> + Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -42,6 +42,7 @@ public: bool italic, Colour colour, int size, + float aspect_adjust, Time in, Time out, float v_position, @@ -108,9 +109,17 @@ public: int size () const { return _size; } - + int size_in_pixels (int screen_height) const; + /** @return Aspect ratio `adjustment' of the font size. + * Values greater than 1 widen each character, values less than 1 narrow each character, + * and the value must be between 0.25 and 4. + */ + float aspect_adjust () const { + return _aspect_adjust; + } + /** @param p New vertical position as a proportion of the screen height * from the top (between 0 and 1) */ @@ -133,6 +142,7 @@ private: * would be 1/11th of the screen height. */ int _size; + float _aspect_adjust; Time _in; Time _out; /** Vertical position as a proportion of the screen height from the _v_align |
