summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-10-02 00:13:17 +0100
committerCarl Hetherington <cth@carlh.net>2014-10-02 00:13:17 +0100
commit9c29ced5d331ae3c9a172172031a5311b40ece67 (patch)
treedb6a6ed30ac654e6ac3be06968cbf88665f58940 /src/lib
parent49da659616cc755dac337f297b3212ecf4564c2e (diff)
Subtitle v position is from 0->1, not a %age.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/render_subtitles.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/render_subtitles.cc b/src/lib/render_subtitles.cc
index 5364b8dfe..6f103246c 100644
--- a/src/lib/render_subtitles.cc
+++ b/src/lib/render_subtitles.cc
@@ -37,11 +37,11 @@ calculate_position (dcp::VAlign v_align, double v_position, int target_height, i
{
switch (v_align) {
case dcp::TOP:
- return (v_position / 100) * target_height - offset;
+ return v_position * target_height - offset;
case dcp::CENTER:
- return (0.5 + v_position / 100) * target_height - offset;
+ return (0.5 + v_position) * target_height - offset;
case dcp::BOTTOM:
- return (1.0 - v_position / 100) * target_height - offset;
+ return (1.0 - v_position) * target_height - offset;
}
return 0;