diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-06-05 23:46:37 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-06-05 23:46:37 +0200 |
| commit | 6c5328f07362510a41c8518ced62d74b2eff25cc (patch) | |
| tree | 308edc86eecd688a45740a03356a15d685a774c5 /src/subtitle_string.cc | |
| parent | 872000f46a36849433219c0a20b11262f9f9a031 (diff) | |
Make size_in_pixels() more accurate.v1.8.20
Diffstat (limited to 'src/subtitle_string.cc')
| -rw-r--r-- | src/subtitle_string.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/subtitle_string.cc b/src/subtitle_string.cc index 5e2c6251..e70a849f 100644 --- a/src/subtitle_string.cc +++ b/src/subtitle_string.cc @@ -90,7 +90,7 @@ SubtitleString::SubtitleString ( } -int +float SubtitleString::size_in_pixels (int screen_height) const { /* Size in the subtitle file is given in points as if the screen @@ -98,7 +98,7 @@ SubtitleString::size_in_pixels (int screen_height) const height. */ - return _size * screen_height / (11 * 72); + return _size * static_cast<float>(screen_height) / (11.0f * 72.0f); } |
