Fix up subtitle positioning under crop.
authorCarl Hetherington <cth@carlh.net>
Sun, 21 Oct 2012 12:43:59 +0000 (13:43 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 21 Oct 2012 12:43:59 +0000 (13:43 +0100)
src/wx/film_viewer.cc

index f029a1a38368421a60c56d1b1126b4bb3226a230..8c1ce34e0486df31703a53cf2ecf17c28453bb21 100644 (file)
@@ -182,8 +182,8 @@ private:
 
                        _subtitle->transformed_image = _subtitle->base_image;
                        _subtitle->transformed_image.Rescale (_subtitle->transformed_area.width, _subtitle->transformed_area.height, wxIMAGE_QUALITY_HIGH);
-                       _subtitle->transformed_area.x -= _film->crop().left;
-                       _subtitle->transformed_area.y -= _film->crop().top;
+                       _subtitle->transformed_area.x -= rint (_film->crop().left * x_scale);
+                       _subtitle->transformed_area.y -= rint (_film->crop().top * y_scale);
                        _subtitle->bitmap.reset (new wxBitmap (_subtitle->transformed_image));
                }
        }