changeset 23033:0922c459e61d

Scale camera distance. Otherwise perspective does not look the same in fullscreen.
author eugeni
date Sat, 21 Apr 2007 10:42:10 +0000
parents 9af8162a973a
children 82697eb7803d
files libass/ass_render.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libass/ass_render.c	Sat Apr 21 03:20:13 2007 +0000
+++ b/libass/ass_render.c	Sat Apr 21 10:42:10 2007 +0000
@@ -1582,6 +1582,7 @@
  * Result is returned in v.
  */
 static inline void transform_vector_3d(FT_Vector* v, double *m) {
+	const double camera = 2500 * frame_context.border_scale; // camera distance
 	double a[4], b[4];
 	a[0] = d6_to_double(v->x);
 	a[1] = d6_to_double(v->y);
@@ -1597,9 +1598,9 @@
 	   Camera is always located in (org_x, org_y, -2500). This means
 	   that different subtitle events can be displayed at the same time
 	   using different cameras. */
-	b[0] *= 2500;
-	b[1] *= 2500;
-	b[3] = 8 * b[2] + 2500;
+	b[0] *= camera;
+	b[1] *= camera;
+	b[3] = 8 * b[2] + camera;
 	if (b[3] < 0.001 && b[3] > -0.001)
 		b[3] = b[3] < 0. ? -0.001 : 0.001;
 	v->x = double_to_d6(b[0] / b[3]);