projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
49da659
)
Subtitle v position is from 0->1, not a %age.
author
Carl Hetherington
<cth@carlh.net>
Wed, 1 Oct 2014 23:13:17 +0000
(
00:13
+0100)
committer
Carl Hetherington
<cth@carlh.net>
Wed, 1 Oct 2014 23:13:17 +0000
(
00:13
+0100)
src/lib/render_subtitles.cc
patch
|
blob
|
history
diff --git
a/src/lib/render_subtitles.cc
b/src/lib/render_subtitles.cc
index 5364b8dfe3eeb9a3e0f0c1655c2b1ff4a425ca3a..6f103246c9c6f3538de616f153062308fe6b0de9 100644
(file)
--- 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:
{
switch (v_align) {
case dcp::TOP:
- return
(v_position / 100)
* target_height - offset;
+ return
v_position
* target_height - offset;
case dcp::CENTER:
case dcp::CENTER:
- return (0.5 + v_position
/ 100
) * target_height - offset;
+ return (0.5 + v_position) * target_height - offset;
case dcp::BOTTOM:
case dcp::BOTTOM:
- return (1.0 - v_position
/ 100
) * target_height - offset;
+ return (1.0 - v_position) * target_height - offset;
}
return 0;
}
return 0;