Allow no-stretch scaling of video content.
[dcpomatic.git] / src / lib / ratio.cc
index 5988b34188375eade8e2c8eac218de93b90bf141..41abbb76020667df16d93e24f0aef17f8986ed9e 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <libdcp/types.h>
 #include "ratio.h"
+#include "util.h"
 
 #include "i18n.h"
 
@@ -28,19 +29,6 @@ using std::vector;
 
 vector<Ratio const *> Ratio::_ratios;
 
-libdcp::Size
-Ratio::size (libdcp::Size full_frame) const
-{
-       if (_ratio < static_cast<float>(full_frame.width) / full_frame.height) {
-               return libdcp::Size (full_frame.height * _ratio, full_frame.height);
-       } else {
-               return libdcp::Size (full_frame.width, full_frame.width / _ratio);
-       }
-
-       return libdcp::Size ();
-}
-
-
 void
 Ratio::setup_ratios ()
 {